Date: Sat, 6 Oct 2012 17:14:23 -0700 From: Simon Gerraty <sjg@juniper.net> To: <freebsd-arch@freebsd.org> Subject: bsd.own.mk - just let WITHOUT_* take precedence Message-ID: <20121007001423.9878F58094@chaos.jnpr.net>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121007001423.9878F58094>
