From owner-svn-src-stable@freebsd.org Tue May 16 02:23:55 2017 Return-Path: Delivered-To: svn-src-stable@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 556B8D6F796; Tue, 16 May 2017 02:23:55 +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 2678E1DFE; Tue, 16 May 2017 02:23:55 +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 v4G2Nslx060902; Tue, 16 May 2017 02:23:54 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G2Nsjb060901; Tue, 16 May 2017 02:23:54 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705160223.v4G2Nsjb060901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 16 May 2017 02:23:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318332 - stable/11/share/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 02:23:55 -0000 Author: bdrewery Date: Tue May 16 02:23:54 2017 New Revision: 318332 URL: https://svnweb.freebsd.org/changeset/base/318332 Log: MFC r318092: PROGS+META_MODE: Avoid rebuilding common sources when recursing. Modified: stable/11/share/mk/bsd.progs.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/bsd.progs.mk ============================================================================== --- stable/11/share/mk/bsd.progs.mk Tue May 16 00:34:53 2017 (r318331) +++ stable/11/share/mk/bsd.progs.mk Tue May 16 02:23:54 2017 (r318332) @@ -87,11 +87,7 @@ $v = # handle being called [bsd.]progs.mk .include -.if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) -# tell progs.mk we might want to install things -PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install - -# Find common sources among the PROGS and depend on them before building +# Find common sources among the PROGS to depend on them before building # anything. This allows parallelization without them each fighting over # the same objects. _PROGS_COMMON_SRCS= @@ -110,6 +106,20 @@ _PROGS_COMMON_OBJS= ${_PROGS_COMMON_SRCS .if !empty(_PROGS_COMMON_SRCS:N*.[dhly]) _PROGS_COMMON_OBJS+= ${_PROGS_COMMON_SRCS:N*.[dhly]:R:S/$/.o/g} .endif +.endif + +# When recursing, ensure common sources are not rebuilt in META_MODE. +.if defined(_RECURSING_PROGS) && !empty(_PROGS_COMMON_OBJS) && \ + !empty(.MAKE.MODE:Mmeta) +${_PROGS_COMMON_OBJS}: .NOMETA +.endif + +.if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) +# tell progs.mk we might want to install things +PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install + +# Ensure common objects are built before recursing. +.if !empty(_PROGS_COMMON_OBJS) ${PROGS}: ${_PROGS_COMMON_OBJS} .endif