Date: Tue, 16 May 2017 02:23:54 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> 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 Message-ID: <201705160223.v4G2Nsjb060901@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <bsd.prog.mk> -.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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705160223.v4G2Nsjb060901>