Date: Wed, 4 Sep 2019 18:32:12 +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: r351823 - head/share/mk Message-ID: <201909041832.x84IWCvd093677@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdrewery Date: Wed Sep 4 18:32:11 2019 New Revision: 351823 URL: https://svnweb.freebsd.org/changeset/base/351823 Log: PROGS: Build common sources before recursed PROGS_TARGETS as well when building. MFC after: 2 weeks Sponsored by: DellEMC Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk ============================================================================== --- head/share/mk/bsd.progs.mk Wed Sep 4 18:00:54 2019 (r351822) +++ head/share/mk/bsd.progs.mk Wed Sep 4 18:32:11 2019 (r351823) @@ -92,6 +92,7 @@ $v = # handle being called [bsd.]progs.mk .include <bsd.prog.mk> +.if !defined(_SKIP_BUILD) # Find common sources among the PROGS to depend on them before building # anything. This allows parallelization without them each fighting over # the same objects. @@ -118,6 +119,7 @@ _PROGS_COMMON_OBJS+= ${_PROGS_COMMON_SRCS:N*.[dhly]:${ !empty(.MAKE.MODE:Mmeta) ${_PROGS_COMMON_OBJS}: .NOMETA .endif +.endif .if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) # tell progs.mk we might want to install things @@ -132,11 +134,6 @@ _PROG_MK.cleanobj= CLEANDEPENDFILES= CLEANDEPENDDIRS= PROGS_TARGETS+= cleandir cleanobj .endif -# Ensure common objects are built before recursing. -.if !empty(_PROGS_COMMON_OBJS) -${PROGS}: ${_PROGS_COMMON_OBJS} -.endif - .for p in ${PROGS} .if defined(PROGS_CXX) && !empty(PROGS_CXX:M$p) # bsd.prog.mk may need to know this @@ -144,7 +141,7 @@ x.$p= PROG_CXX=$p .endif # Main PROG target -$p ${p}_p: .PHONY .MAKE +$p ${p}_p: .PHONY .MAKE ${_PROGS_COMMON_OBJS} (cd ${.CURDIR} && \ DEPENDFILE=.depend.$p \ NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS=t \ @@ -152,7 +149,7 @@ $p ${p}_p: .PHONY .MAKE # Pseudo targets for PROG, such as 'install'. .for t in ${PROGS_TARGETS:O:u} -$p.$t: .PHONY .MAKE +$p.$t: .PHONY .MAKE ${_PROGS_COMMON_OBJS} (cd ${.CURDIR} && \ DEPENDFILE=.depend.$p \ NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS=t \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909041832.x84IWCvd093677>