summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2014-12-22 00:21:24 +0000
committerngie <ngie@FreeBSD.org>2014-12-22 00:21:24 +0000
commit8cd5c94ddbcb3dde3a3e9628086cf09b6e54e6b8 (patch)
tree687de591dcb53e13a0c3b8ca7fc575ae3c345da2 /share
parent5f92f0907a2e4697198dd62d1d9ecc01f3c548a0 (diff)
downloadFreeBSD-src-8cd5c94ddbcb3dde3a3e9628086cf09b6e54e6b8.zip
FreeBSD-src-8cd5c94ddbcb3dde3a3e9628086cf09b6e54e6b8.tar.gz
MFC r273186,r273873:
r273186: Don't define rules based on PROGS if PROGS is empty. Reviewed by: sjg, ngie Sponsored by: EMC / Isilon Storage Division r273873: Use the right depend file for each program. bsd.progs.mk generates a separate depend file for every program being built, but then it does not properly tell each submake to use those individual files. Properly propagate the depend file to use. Discovered while preparing the update of atf to 0.21 and noticing that the test programs were not being relinked to the new library. This change is "make tinderbox" clean.
Diffstat (limited to 'share')
-rw-r--r--share/mk/bsd.progs.mk10
1 files changed, 8 insertions, 2 deletions
diff --git a/share/mk/bsd.progs.mk b/share/mk/bsd.progs.mk
index 7a7c086..64fae5f 100644
--- a/share/mk/bsd.progs.mk
+++ b/share/mk/bsd.progs.mk
@@ -90,18 +90,24 @@ x.$p= PROG_CXX=$p
$p ${p}_p: .PHONY .MAKE
(cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \
- SUBDIR= PROG=$p ${x.$p})
+ SUBDIR= PROG=$p \
+ DEPENDFILE=.depend.$p .MAKE.DEPENDFILE=.depend.$p \
+ ${x.$p})
.for t in ${PROGS_TARGETS:O:u}
$p.$t: .PHONY .MAKE
(cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \
- SUBDIR= PROG=$p ${x.$p} ${@:E})
+ SUBDIR= PROG=$p \
+ DEPENDFILE=.depend.$p .MAKE.DEPENDFILE=.depend.$p \
+ ${x.$p} ${@:E})
.endfor
.endfor
+.if !empty(PROGS)
.for t in ${PROGS_TARGETS:O:u}
$t: ${PROGS:%=%.$t}
.endfor
+.endif
.if empty(PROGS) && !empty(SCRIPTS)
OpenPOWER on IntegriCloud