svn commit: r263950 - in head: . share/mk
Warner Losh
imp at FreeBSD.org
Sun Mar 30 22:24:46 UTC 2014
Author: imp
Date: Sun Mar 30 22:24:45 2014
New Revision: 263950
URL: http://svnweb.freebsd.org/changeset/base/263950
Log:
Allow the build system to safely set MK_FOO to avoid the ambiguity
when both WITH_FOO and WITHOUT_FOO are set. Use this where
possible. Only disallow setting of MK_FOO on the command line. This
was preferable to inventing a new mechanism or fixing the undef bug
(bin/183762) which precludes users from turning off anything we turn
off for parts of the build with WITHOUT_FOO prior to this.
Modified:
head/Makefile.inc1
head/share/mk/bsd.own.mk
Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1 Sun Mar 30 22:24:37 2014 (r263949)
+++ head/Makefile.inc1 Sun Mar 30 22:24:45 2014 (r263950)
@@ -247,7 +247,7 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \
DESTDIR= \
BOOTSTRAPPING=${OSRELDATE} \
SSP_CFLAGS= \
- -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \
+ MK_HTML=no MK_INFO=no NO_LINT=yes MK_MAN=no \
-DNO_PIC -DNO_PROFILE -DNO_SHARED \
-DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD -DNO_TESTS
@@ -264,7 +264,7 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \
# cross-tools stage
XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \
TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
- -DWITHOUT_GDB -DNO_TESTS
+ MK_GDB=no -DNO_TESTS
# kernel-tools stage
KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \
@@ -277,7 +277,7 @@ KTMAKE= TOOLS_PREFIX=${WORLDTMP} MAKEOB
DESTDIR= \
BOOTSTRAPPING=${OSRELDATE} \
SSP_CFLAGS= \
- -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \
+ MK_HTML=no MK_INFO=no -DNO_LINT MK_MAN=no \
-DNO_PIC -DNO_PROFILE -DNO_SHARED \
-DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD
@@ -423,7 +423,7 @@ LIB32WMAKEFLAGS+= \
-DNO_TESTS
LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} ${LIB32WMAKEFLAGS} \
- -DWITHOUT_MAN -DWITHOUT_INFO -DWITHOUT_HTML
+ MK_MAN=no MK_INFO=no MK_HTML=no
LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS \
${IMAKE_INSTALL}
.endif
@@ -574,8 +574,8 @@ _libraries:
@echo ">>> stage 4.2: building libraries"
@echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; \
- ${WMAKE} -DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
- -DWITHOUT_MAN -DNO_PROFILE -DNO_TESTS libraries
+ ${WMAKE} -DNO_FSCHG MK_HTML=no MK_INFO=no -DNO_LINT MK_MAN=no \
+ -DNO_PROFILE -DNO_TESTS libraries
_depend:
@echo
@echo "--------------------------------------------------------------"
@@ -1881,9 +1881,9 @@ XDEV_CPUTYPE?=${CPUTYPE}
XDEV_CPUTYPE?=${TARGET_CPUTYPE}
.endif
-NOFUN=-DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
- -DWITHOUT_MAN -DWITHOUT_NLS -DNO_PROFILE \
- -DWITHOUT_KERBEROS -DWITHOUT_RESCUE -DNO_TESTS -DNO_WARNS \
+NOFUN=-DNO_FSCHG MK_HTML=no MK_INFO=no -DNO_LINT \
+ MK_MAN=no MK_NLS=no -DNO_PROFILE \
+ MK_KERBEROS=no MK_RESCUE=no -DNO_TESTS -DNO_WARNS \
TARGET=${XDEV} TARGET_ARCH=${XDEV_ARCH} \
CPUTYPE=${XDEV_CPUTYPE}
Modified: head/share/mk/bsd.own.mk
==============================================================================
--- head/share/mk/bsd.own.mk Sun Mar 30 22:24:37 2014 (r263949)
+++ head/share/mk/bsd.own.mk Sun Mar 30 22:24:45 2014 (r263950)
@@ -229,10 +229,7 @@ COMPRESS_EXT?= .gz
MAN \
PROFILE
.if defined(NO_${var})
-.if defined(WITH_${var})
-.undef WITH_${var}
-.endif
-WITHOUT_${var}=
+MK_${var}:=no
.endif
.endfor
@@ -446,13 +443,16 @@ __DEFAULT_NO_OPTIONS+=FDT
.error WITH_${var} and WITHOUT_${var} can't both be set.
.endif
.if defined(MK_${var})
+.if ${.MAKE.LEVEL} == 0
.error MK_${var} can't be set by a user.
.endif
+.else
.if defined(WITHOUT_${var})
MK_${var}:= no
.else
MK_${var}:= yes
.endif
+.endif
.endfor
.undef __DEFAULT_YES_OPTIONS
@@ -464,13 +464,16 @@ MK_${var}:= yes
.error WITH_${var} and WITHOUT_${var} can't both be set.
.endif
.if defined(MK_${var})
+.if ${.MAKE.LEVEL} == 0
.error MK_${var} can't be set by a user.
.endif
+.else
.if defined(WITH_${var})
MK_${var}:= yes
.else
MK_${var}:= no
.endif
+.endif
.endfor
.undef __DEFAULT_NO_OPTIONS
@@ -620,8 +623,10 @@ MK_${vv:H}:= ${MK_${vv:T}}
.error WITH_${var} and WITHOUT_${var} can't both be set.
.endif
.if defined(MK_${var})
+.if ${.MAKE.LEVEL} == 0
.error MK_${var} can't be set by a user.
.endif
+.else
.if ${COMPILER_FEATURES:Mc++11}
.if defined(WITHOUT_${var})
MK_${var}:= no
@@ -635,6 +640,7 @@ MK_${var}:= yes
MK_${var}:= no
.endif
.endif
+.endif
.endfor
.if !${COMPILER_FEATURES:Mc++11}
More information about the svn-src-head
mailing list