Date: Fri, 21 Apr 2006 11:43:33 +0200 From: Jeremie Le Hen <jeremie@le-hen.org> To: Ruslan Ermilov <ru@FreeBSD.org> Cc: current@FreeBSD.org Subject: Re: [fbsd] Re: [fbsd] [HEADS UP] New world/kernel build options are imminent Message-ID: <20060421094333.GF68951@obiwan.tataz.chchile.org> In-Reply-To: <20060420155438.GC68951@obiwan.tataz.chchile.org> References: <20060317165638.GA1172@ip.net.ua> <20060420155438.GC68951@obiwan.tataz.chchile.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--BXVAT5kNtrzKuDFl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
On Thu, Apr 20, 2006 at 05:54:38PM +0200, Jeremie Le Hen wrote:
> During the early buildworld process, I need to disable a feature that
> may have been enabled in src.conf(5) with the WITH_FOO knob.
> IOW, I want to be sure that the feature FOO is disabled for
> legacy, bootstrap-tools, build-tools and cross-tools targets.
>
> However if the WITH_FOO knob is enabled in src.conf(5), using
> "WITHOUT_FOO=" inside BMAKE, TMAKE and XMAKE macros would lead to an
> error triggered by bsd.own.mk :
> % 373 .if defined(WITH_${var}) && defined(WITHOUT_${var})
> % 374 .error WITH_${var} and WITHOUT_${var} can't both be set.
> % 375 .endif
>
> How should I handle that ? I could override SRCCONF and set it to
> /dev/null, but I don't think it is acceptable because according to
> Makefile.inc1, bootstrap-tools, build-tools and cross-tools targets
> might be influenced by src.conf(5) knobs.
Is the attached patch something acceptable ? This permits to override
WITH(OUT)_* knobs in src.conf(5) in early targets of buildworld.
I can write the documentation if needed.
Regards,
--
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >
--BXVAT5kNtrzKuDFl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="bsd.own.mk.diff"
Index: bsd.own.mk
===================================================================
RCS file: /home/ncvs/src/share/mk/bsd.own.mk,v
retrieving revision 1.53
diff -u -p -u -r1.53 bsd.own.mk
--- bsd.own.mk 1 Apr 2006 18:11:42 -0000 1.53
+++ bsd.own.mk 21 Apr 2006 09:40:26 -0000
@@ -260,7 +260,7 @@ WITHOUT_${var}=
TOOLCHAIN \
USB \
WPA_SUPPLICANT_EAPOL
-.if defined(NO_${var})
+.if defined(NO_${var}) && ${NO_${var}} != 'no' && ${NO_${var}} != 'NO'
#.warning NO_${var} is deprecated in favour of WITHOUT_${var}=
WITHOUT_${var}=
.endif
@@ -355,7 +355,7 @@ WITH_IDEA=
.if defined(MK_${var})
.error MK_${var} can't be set by a user.
.endif
-.if defined(WITHOUT_${var})
+.if defined(WITHOUT_${var}) && ${WITHOUT_${var}} != 'no' && ${WITHOUT_${var}} != 'NO'
MK_${var}:= no
.else
MK_${var}:= yes
@@ -375,7 +375,7 @@ MK_${var}:= yes
.if defined(MK_${var})
.error MK_${var} can't be set by a user.
.endif
-.if defined(WITH_${var})
+.if defined(WITH_${var}) && ${WITH_${var}} != 'no' && ${WITH_${var}} != 'NO'
MK_${var}:= yes
.else
MK_${var}:= no
--BXVAT5kNtrzKuDFl--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060421094333.GF68951>
