diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2015-10-21 00:25:18 +0000 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2015-10-21 00:25:18 +0000 |
commit | 9bff9cbf0cbe48b8d626b26743dd0e559c17bda3 (patch) | |
tree | 4d6f7a48d1a9295521cb0c3ced7fa08a56e1c68c /share/mk | |
parent | f7c12e6bb77645841c7e35b76a82a7a51fe73afc (diff) | |
download | FreeBSD-src-9bff9cbf0cbe48b8d626b26743dd0e559c17bda3.zip FreeBSD-src-9bff9cbf0cbe48b8d626b26743dd0e559c17bda3.tar.gz |
Fix building in a directory with SUBDIRs and SUBDIR_PARALLEL.
The SUBDIR_PARALLEL feature uses a .for dir in ${SUBDIR} loop. The old code
here for recursing was setting SUBDIR= as a make *argument*. The SUBDIR=
replacement was not actually handled until after the .for loop was unrolled.
This could be seen with a '.info ${SUBDIR} ${dir}' inside of the loop which
showed an empty ${SUBDIR} and a set ${dir}. Setting NO_SUBIDR= before calling
${MAKE} as an *environment* variable handles the case fine and is a more
proper mechanism for disabling subdir handling.
This could be seen with 'make -C tests/sys/kern -j15 SUBDIR_PARALLEL=yes'.
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'share/mk')
-rw-r--r-- | share/mk/bsd.progs.mk | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/share/mk/bsd.progs.mk b/share/mk/bsd.progs.mk index 2da30c7..dce05c7 100644 --- a/share/mk/bsd.progs.mk +++ b/share/mk/bsd.progs.mk @@ -116,16 +116,16 @@ x.$p= PROG_CXX=$p $p ${p}_p: .PHONY .MAKE (cd ${.CURDIR} && \ DEPENDFILE=.depend.$p \ - ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ - SUBDIR= PROG=$p ${x.$p}) + NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ + PROG=$p ${x.$p}) # Pseudo targets for PROG, such as 'install'. .for t in ${PROGS_TARGETS:O:u} $p.$t: .PHONY .MAKE (cd ${.CURDIR} && \ DEPENDFILE=.depend.$p \ - ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ - SUBDIR= PROG=$p ${x.$p} ${@:E}) + NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ + PROG=$p ${x.$p} ${@:E}) .endfor .endfor |