From owner-svn-src-all@freebsd.org Tue Oct 31 19:02:15 2017 Return-Path: Delivered-To: svn-src-all@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 AA681E611D3; Tue, 31 Oct 2017 19:02:15 +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 5E5C8AF8; Tue, 31 Oct 2017 19:02: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 v9VJ2Eic064273; Tue, 31 Oct 2017 19:02:14 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9VJ2EoF064248; Tue, 31 Oct 2017 19:02:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201710311902.v9VJ2EoF064248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 31 Oct 2017 19:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325244 - head X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 325244 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Oct 2017 19:02:15 -0000 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}