Allow setting of MK_FOO by anybody. There are too many edge cases that

we're preventing now with this policy. However, these edge cases
should be rare and all that set MK_FOO directly.
WITH_FOO and WITHOUT_FOO both being defined now result in the
non-default behavior happening silently. Users needing determinism
here fall into the edge case exception for MK_FOO setting.
This commit is contained in:
Warner Losh 2014-04-18 17:04:18 +00:00
parent 6a542ebed9
commit 4f9fa02d54

View File

@ -247,14 +247,7 @@ __DEFAULT_YES_OPTIONS+=GCC GNUCXX GCC_BOOTSTRAP
# 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})
.if defined(.MAKE.LEVEL) && ${.MAKE.LEVEL} == 0
.error MK_${var} can't be set by a user.
.endif
.else
.if !defined(MK_${var})
.if defined(WITHOUT_${var})
MK_${var}:= no
.else
@ -268,14 +261,7 @@ 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})
.if defined(.MAKE.LEVEL) && ${.MAKE.LEVEL} == 0
.error MK_${var} can't be set by a user.
.endif
.else
.if !defined(MK_${var})
.if defined(WITH_${var})
MK_${var}:= yes
.else
@ -397,12 +383,6 @@ MK_CLANG_FULL:= no
NETGRAPH \
PAM \
WIRELESS
.if defined(WITH_${var}_SUPPORT) && defined(WITHOUT_${var}_SUPPORT)
.error WITH_${var}_SUPPORT and WITHOUT_${var}_SUPPORT can't both be set.
.endif
.if defined(MK_${var}_SUPPORT)
.error MK_${var}_SUPPORT can't be set by a user.
.endif
.if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no"
MK_${var}_SUPPORT:= no
.else
@ -416,12 +396,6 @@ MK_${var}_SUPPORT:= yes
.for vv in \
GSSAPI/KERBEROS \
MAN_UTILS/MAN
.if defined(WITH_${vv:H}) && defined(WITHOUT_${vv:H})
.error WITH_${vv:H} and WITHOUT_${vv:H} can't both be set.
.endif
.if defined(MK_${vv:H})
.error MK_${vv:H} can't be set by a user.
.endif
.if defined(WITH_${vv:H})
MK_${vv:H}:= yes
.elif defined(WITHOUT_${vv:H})
@ -437,14 +411,7 @@ MK_${vv:H}:= ${MK_${vv:T}}
.include <bsd.compiler.mk>
.for var in \
LIBCPLUSPLUS
.if defined(WITH_${var}) && defined(WITHOUT_${var})
.error WITH_${var} and WITHOUT_${var} can't both be set.
.endif
.if defined(MK_${var})
.if defined(.MAKE.LEVEL) && ${.MAKE.LEVEL} == 0
.error MK_${var} can't be set by a user.
.endif
.else
.if !defined(MK_${var})
.if ${COMPILER_FEATURES:Mc++11}
.if defined(WITHOUT_${var})
MK_${var}:= no