[fbsd] Re: [fbsd] [HEADS UP] New world/kernel build options are imminent

Jeremie Le Hen jeremie at le-hen.org
Fri Apr 21 09:43:36 UTC 2006


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 >
-------------- next part --------------
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


More information about the freebsd-current mailing list