bsd.own.mk - just let WITHOUT_* take precedence
Simon Gerraty
sjg at juniper.net
Sun Oct 7 00:15:27 UTC 2012
After being bitten by:
make: "/b/sjg/work/fbsd-head/src/share/mk/bsd.own.mk" line 490: WITH_CTF
and WITHOUT_CTF can't both be set.
I took a look at bsd.own.mk
I'm not sure what's so evil about setting both WITH_ and WITHOUT_
especially when bits of buildworld, buildkernel etc, set WITHOUT_
(which triggers the problem for me).
All that seems necessary is a clear rule - "WITHOUT_ wins".
Thus the patch below solve my problem.
Index: share/mk/bsd.own.mk
===================================================================
--- share/mk/bsd.own.mk (revision 241871)
+++ share/mk/bsd.own.mk (working copy)
@@ -468,9 +468,6 @@ __DEFAULT_NO_OPTIONS+=FDT
# MK_* options which default to "yes".
#
.for var in ${__DEFAULT_YES_OPTIONS}
-.if defined(WITH_${var}) && defined(WITHOUT_${var})
-.error WITH_${var} and WITHOUT_${var} can't both be set.
-.endif
.if defined(MK_${var})
.error MK_${var} can't be set by a user.
.endif
@@ -486,13 +483,10 @@ MK_${var}:= yes
# MK_* options which default to "no".
#
.for var in ${__DEFAULT_NO_OPTIONS}
-.if defined(WITH_${var}) && defined(WITHOUT_${var})
-.error WITH_${var} and WITHOUT_${var} can't both be set.
-.endif
.if defined(MK_${var})
.error MK_${var} can't be set by a user.
.endif
-.if defined(WITH_${var})
+.if defined(WITH_${var}) && !defined(WITHOUT_${var})
MK_${var}:= yes
.else
MK_${var}:= no
More information about the freebsd-arch
mailing list