From owner-svn-src-head@freebsd.org Tue Jun 14 16:20:16 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2891FB6A87C; Tue, 14 Jun 2016 16:20:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 D8129269E; Tue, 14 Jun 2016 16:20:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5EGKFGf008323; Tue, 14 Jun 2016 16:20:15 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EGKFa1008322; Tue, 14 Jun 2016 16:20:15 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606141620.u5EGKFa1008322@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 14 Jun 2016 16:20:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301887 - head 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.22 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: Tue, 14 Jun 2016 16:20:16 -0000 Author: bdrewery Date: Tue Jun 14 16:20:14 2016 New Revision: 301887 URL: https://svnweb.freebsd.org/changeset/base/301887 Log: WITH_META_MODE: Whitelist targets that are meta-mode-safe. META_TGT_WHITELIST is added to define which build targets are safe for meta mode. See comments for more details. This fixes 'make delete-old-libs' to properly show the interactive prompt. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Tue Jun 14 16:20:11 2016 (r301886) +++ head/Makefile Tue Jun 14 16:20:14 2016 (r301887) @@ -133,12 +133,27 @@ TGTS= all all-man buildenv buildenvvars create-world-packages create-kernel-packages create-packages \ packages installconfig real-packages sign-packages package-pkg +# XXX: r156740: This can't work since bsd.subdir.mk is not included ever. +# It will only work for SUBDIR_TARGETS in make.conf. TGTS+= ${SUBDIR_TARGETS} BITGTS= files includes BITGTS:=${BITGTS} ${BITGTS:S/^/build/} ${BITGTS:S/^/install/} TGTS+= ${BITGTS} +# Only some targets are allowed to use meta mode. Others get it +# disabled. In some cases, such as 'install', meta mode can be dangerous +# as a cookie may be used to prevent redundant installations (such as +# for WORLDTMP staging). For DESTDIR=/ we always want to install though. +# For other cases, such as delete-old-libs, meta mode may break +# the interactive tty prompt. The safest route is to just whitelist +# the ones that benefit from it. +META_TGT_WHITELIST+= \ + _* build32 buildfiles buildincludes buildkernel buildsoft \ + buildworld everything kernel-toolchains kernels libraries \ + native-xtools tinderbox toolchain toolchains universe worlds \ + xdev xdev-build + .ORDER: buildworld installworld .ORDER: buildworld distributeworld .ORDER: buildworld buildkernel @@ -194,14 +209,17 @@ SUB_MAKE= ${MAKE} -m ${.CURDIR}/share/mk _MAKE= PATH=${PATH} ${SUB_MAKE} -f Makefile.inc1 TARGET=${_TARGET} TARGET_ARCH=${_TARGET_ARCH} -# Must disable META_MODE when installing to avoid missing anything. The -# main problem is that buildworld will create cookies for install targets -# since they are being installed into WORLDTMP. This avoids unneeded and -# redundant restaging but is dangerous for user install targets. -.if make(distrib*) || make(*install*) +# Only allow meta mode for the whitelisted targets. See META_TGT_WHITELIST +# above. +.for _tgt in ${META_TGT_WHITELIST} +.if make(${_tgt}) +_CAN_USE_META_MODE?= yes +.endif +.endfor +.if !defined(_CAN_USE_META_MODE) _MAKE+= MK_META_MODE=no .unexport META_MODE -.endif +.endif # !defined(_CAN_USE_META_MODE) # Guess machine architecture from machine type, and vice versa. .if !defined(TARGET_ARCH) && defined(TARGET)