From owner-svn-src-head@freebsd.org Thu Nov 2 20:45:06 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 06A56E62BDC; Thu, 2 Nov 2017 20:45:06 +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 C9BA368ACA; Thu, 2 Nov 2017 20:45:05 +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 vA2Kj4j7041159; Thu, 2 Nov 2017 20:45:04 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vA2Kj4p7041157; Thu, 2 Nov 2017 20:45:04 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201711022045.vA2Kj4p7041157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 2 Nov 2017 20:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325342 - in head: . share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in head: . share/mk X-SVN-Commit-Revision: 325342 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: Thu, 02 Nov 2017 20:45:06 -0000 Author: bdrewery Date: Thu Nov 2 20:45:04 2017 New Revision: 325342 URL: https://svnweb.freebsd.org/changeset/base/325342 Log: DIRDEPS_BUILD: Cleanup leftover WORLDTMP files. This will force any existing objects to rebuild if their .meta files reference files from WORLDTMP. This is a problem after the UNIFIED_OBJDIR effort caused buildworld and DIRDEPS_BUILD to share an OBJDIR. Without cleaning these files the Makefile.depend files end up with odd tmp/legacy/... entries since some bootstrap-tools linger from there and otherwise don't rebuild. Removing the files causes anything having used WORLDTMP to rebuild. Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 head/share/mk/local.dirdeps.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Nov 2 20:28:53 2017 (r325341) +++ head/Makefile.inc1 Thu Nov 2 20:45:04 2017 (r325342) @@ -815,6 +815,7 @@ _worldtmp: .PHONY @echo "--------------------------------------------------------------" .if !defined(NO_CLEAN) rm -rf ${WORLDTMP} + @mkdir -p ${WORLDTMP} .else .if exists(${WORLDTMP}) @echo ">>> Deleting stale files in build tree..." @@ -831,6 +832,7 @@ _worldtmp: .PHONY .endfor .endif # ${USING_SYSTEM_COMPILER} == "yes" .endif # !defined(NO_CLEAN) + @touch ${WORLDTMP}/${.TARGET} .for _dir in \ lib lib/casper usr legacy/bin legacy/usr Modified: head/share/mk/local.dirdeps.mk ============================================================================== --- head/share/mk/local.dirdeps.mk Thu Nov 2 20:28:53 2017 (r325341) +++ head/share/mk/local.dirdeps.mk Thu Nov 2 20:45:04 2017 (r325342) @@ -49,6 +49,20 @@ DIRDEPS_FILTER.host = \ DIRDEPS_FILTER+= \ Nbin/cat.host \ ${DIRDEPS_FILTER.xtras:U} + +# Cleanup a buildworld's WORLDTMP so that any files generated from it +# or using it will rebuild with the DIRDEPS SYSROOT. Otherwise existing +# object .meta files may still reference those directories and not be +# rebuilt and lead to incorrect Makefile.depend files due to lack of +# .dirdep files. +.if !defined(NO_CLEANUP_WORLDTMP) && exists(${OBJTOP}/tmp/_worldtmp) +cleanup_worldtmp: .PHONY .NOMETA + @echo "Cleaning leftover WORLDTMP from buildworld." + -rm -rf ${OBJTOP}/tmp/* + -chflags -R 0 ${OBJTOP}/tmp/* + rm -rf ${OBJTOP}/tmp +beforedirdeps: cleanup_worldtmp +.endif .endif # reset this each time