From owner-svn-src-head@FreeBSD.ORG Sun Mar 30 22:24:46 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 773D398C; Sun, 30 Mar 2014 22:24:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6450F1B5; Sun, 30 Mar 2014 22:24:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2UMOkcE013764; Sun, 30 Mar 2014 22:24:46 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2UMOknE013762; Sun, 30 Mar 2014 22:24:46 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201403302224.s2UMOknE013762@svn.freebsd.org> From: Warner Losh Date: Sun, 30 Mar 2014 22:24:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r263950 - in head: . share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Mar 2014 22:24:46 -0000 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}