Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Oct 2017 19:02:14 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r325244 - head
Message-ID:  <201710311902.v9VJ2EoF064248@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Tue Oct 31 19:02:14 2017
New Revision: 325244
URL: https://svnweb.freebsd.org/changeset/base/325244

Log:
  kernel-toolchain: Skip world _obj and _cleanobj phases.
  
  There's no good reason to treewalk the entire tree removing old OBJDIRS
  and creating new ones when 'includes', 'libraries', and 'everything' are
  all skipped.  The only shared directory in the existing toolchain target
  and world is build-tools.  So handle cleaning in it directly if needed
  only for the directories it wants to build.
  
  The extra _obj/_cleanobj walks came in the initial kernel-toolchain
  addition in r128189.
  
  MFC after:	2 weeks
  Sponsored by:	Dell EMC Isilon

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1	Tue Oct 31 19:02:05 2017	(r325243)
+++ head/Makefile.inc1	Tue Oct 31 19:02:14 2017	(r325244)
@@ -996,7 +996,7 @@ buildenv: .PHONY
 
 TOOLCHAIN_TGTS=	${WMAKE_TGTS:Neverything:Nbuild${libcompat}}
 toolchain: ${TOOLCHAIN_TGTS} .PHONY
-kernel-toolchain: ${TOOLCHAIN_TGTS:N_includes:N_libraries} .PHONY
+kernel-toolchain: ${TOOLCHAIN_TGTS:N_obj:N_cleanobj:N_includes:N_libraries} .PHONY
 
 #
 # installcheck
@@ -1974,6 +1974,12 @@ _rescue=rescue/rescue
 _tcsh=bin/csh
 .endif
 
+# kernel-toolchain skips _cleanobj, so handle cleaning up previous
+# build-tools directories if needed.
+.if !defined(NO_CLEAN) && make(kernel-toolchain)
+_bt_clean=	${CLEANDIR}
+.endif
+
 .for _tool in \
     ${_tcsh} \
     bin/sh \
@@ -1989,8 +1995,9 @@ _tcsh=bin/csh
     usr.bin/vi/catalog \
     ${_gcc_tools}
 build-tools_${_tool}: .PHONY
-	${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \
+	${_+_}@${ECHODIR} "===> ${_tool} (${_bt_clean:D${_bt_clean},}obj,build-tools)"; \
 		cd ${.CURDIR}/${_tool}; \
+		if [ -n "${_bt_clean}" ]; then ${MAKE} DIRPRFX=${_tool}/ ${_bt_clean}; fi; \
 		if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
 		${MAKE} DIRPRFX=${_tool}/ build-tools
 build-tools: build-tools_${_tool}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710311902.v9VJ2EoF064248>