From owner-svn-src-head@freebsd.org Wed Nov 1 21:22:11 2017 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 C7D47E64629; Wed, 1 Nov 2017 21:22:11 +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 A4D7581CD1; Wed, 1 Nov 2017 21:22:11 +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 vA1LMAlZ025547; Wed, 1 Nov 2017 21:22:10 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vA1LMAmV025544; Wed, 1 Nov 2017 21:22:10 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201711012122.vA1LMAmV025544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 1 Nov 2017 21:22:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325289 - in head: . share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in head: . share/man/man7 X-SVN-Commit-Revision: 325289 X-SVN-Commit-Repository: base 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.23 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: Wed, 01 Nov 2017 21:22:11 -0000 Author: bdrewery Date: Wed Nov 1 21:22:10 2017 New Revision: 325289 URL: https://svnweb.freebsd.org/changeset/base/325289 Log: Add a 'make cleanuniverse'. This will remove all build files for the source directory when MK_UNIFIED_OBJDIR is enabled. Sponsored by: Dell EMC Isilon Modified: head/Makefile head/Makefile.inc1 head/share/man/man7/build.7 Modified: head/Makefile ============================================================================== --- head/Makefile Wed Nov 1 21:22:05 2017 (r325288) +++ head/Makefile Wed Nov 1 21:22:10 2017 (r325289) @@ -122,6 +122,7 @@ TGTS= all all-man buildenv buildenvvars buildkernel buildworld \ check check-old check-old-dirs check-old-files check-old-libs \ checkdpadd checkworld clean cleandepend cleandir cleanworld \ + cleanuniverse \ delete-old delete-old-dirs delete-old-files delete-old-libs \ depend distribute distributekernel distributekernel.debug \ distributeworld distrib-dirs distribution doxygen \ Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Nov 1 21:22:05 2017 (r325288) +++ head/Makefile.inc1 Wed Nov 1 21:22:10 2017 (r325289) @@ -2751,14 +2751,21 @@ builddtb: .PHONY # in this makefile. We don't do a cleandir walk if MK_AUTO_OBJ is yes # since it is not possible for files to land in the wrong place. # -BW_CANONICALOBJDIR:=${OBJTOP} -cleanworld: .PHONY -.if exists(${BW_CANONICALOBJDIR}/) - -rm -rf ${BW_CANONICALOBJDIR}/* +.if make(cleanworld) +BW_CANONICALOBJDIR:=${OBJTOP}/ +.elif make(cleanuniverse) +BW_CANONICALOBJDIR:=${OBJROOT} +.if ${MK_UNIFIED_OBJDIR} == "no" +.error ${.TARGETS} only supported with WITH_UNIFIED_OBJDIR enabled. +.endif +.endif +cleanworld cleanuniverse: .PHONY +.if !empty(BW_CANONICALOBJDIR) && exists(${BW_CANONICALOBJDIR}) + -rm -rf ${BW_CANONICALOBJDIR}* -chflags -R 0 ${BW_CANONICALOBJDIR} - rm -rf ${BW_CANONICALOBJDIR}/* + rm -rf ${BW_CANONICALOBJDIR}* .endif -.if ${MK_AUTO_OBJ} == "no" +.if make(cleanworld) && ${MK_AUTO_OBJ} == "no" .if ${.CURDIR} == ${.OBJDIR} || ${.CURDIR}/obj == ${.OBJDIR} # To be safe in this case, fall back to a 'make cleandir' ${_+_}@cd ${.CURDIR}; ${MAKE} cleandir Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Wed Nov 1 21:22:05 2017 (r325288) +++ head/share/man/man7/build.7 Wed Nov 1 21:22:10 2017 (r325289) @@ -207,8 +207,15 @@ for cross builds and native builds with variable set. .It Cm cleanworld Attempt to clean up targets built by a preceding -.Cm buildworld -step. +.Cm buildworld , +or similar step built from this source directory. +.It Cm cleanuniverse +When +.Va WITH_UNIFIED_OBJDIR +is enabled, attempt to clean up targets built by a preceding +.Cm buildworld , +.Cm universe , +or similar step, for any architecture built from this source directory. .It Cm distributeworld Distribute everything compiled by a preceding .Cm buildworld