Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Apr 2014 17:04:18 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r264662 - head/share/mk
Message-ID:  <201404181704.s3IH4ITf050658@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Fri Apr 18 17:04:18 2014
New Revision: 264662
URL: http://svnweb.freebsd.org/changeset/base/264662

Log:
  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.

Modified:
  head/share/mk/bsd.opts.mk

Modified: head/share/mk/bsd.opts.mk
==============================================================================
--- head/share/mk/bsd.opts.mk	Fri Apr 18 17:04:09 2014	(r264661)
+++ head/share/mk/bsd.opts.mk	Fri Apr 18 17:04:18 2014	(r264662)
@@ -247,14 +247,7 @@ __DEFAULT_YES_OPTIONS+=GCC GNUCXX GCC_BO
 # 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404181704.s3IH4ITf050658>