How to disable a src.conf on command-line
Darren Pilgrim
freebsd at bitfreak.org
Fri Jun 9 22:47:27 UTC 2006
M. Warner Losh wrote:
> In message: <4489E354.5070201 at bitfreak.org>
> Darren Pilgrim <darren.pilgrim at bitfreak.org> writes:
> : M. Warner Losh wrote:
> : > So if you make WITH_SSP off by default, then having WITH_SSP in the
> : > src.conf can't be overridden. If you have it on by default, having
> : > WITHOUT_SSP in the src.conf file can't be overriden. this appears to
> : > be an unintended flaw with the with/without stuff. I'm not sure the
> : > right way to compensate.
> :
> : I can't speak for the "right" way, but if you specify the variable in
> : src.conf/make.conf with ?= instead of =, you can override it on the
> : command-line:
> :
> : # grep KERNCONF /etc/make.conf
> : KERNCONF?=TTPWEB
> : # make -V KERNCONF
> : TTPWEB
> : # env KERNCONF=SOMETHING_ELSE make -V KERNCONF
> : SOMETHING_ELSE
>
> ?= doesn't mesh well with WITH/WITHOUT because then it will always be
> defined, thus defeating its purpose.
Use .ifndef to define WITH/WITHOUT iff its counterpart is undef:
.ifndef WITHOUT_FOO
WITH_FOO=def
.endif
--
Darren Pilgrim
More information about the freebsd-hackers
mailing list