aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorIan Lepore <ian@FreeBSD.org>2014-06-15 13:45:37 +0000
committerIan Lepore <ian@FreeBSD.org>2014-06-15 13:45:37 +0000
commita1c70d6943cc31d362944a84074b820d1078a892 (patch)
tree096be8c18e87ab33c816bec866bb75df9329af5d /share
parentb9402e3d56e45886174a7f939ae7c25814251f78 (diff)
downloadsrc-a1c70d6943cc31d362944a84074b820d1078a892.tar.gz
src-a1c70d6943cc31d362944a84074b820d1078a892.zip
Create a mechanism for providing fine-grained build order dependencies
during SUBDIR_PARALLEL builds. This augments the coarse .WAIT mechanism, which is still useful if you've got a situation such as "almost everything depends on A and B". Because the parallel subdir mechanism uses non-obvious mangling of target names, which should probably remain a private detail of the implementation, it's not easy to do things like "libfoo: libbar", so instead the new mechanism lets you set a variable that lists dependencies: SUBDIR_DEPEND_libfoo= libgroodah libpouet Note that while I'm using libraries as an example here, it really has nothing to do with the generated library files. This is really saying "build in directory libfoo after building in the libgroodah and libpouet directories." This updates lib/Makefile with dependency information based on the old almost-accurate comment block and by combing through lib/* makefiles looking for LDADD dependencies to other libraries within lib/*. Reviewed by: Jia-Shiun Li <jiashiun@gmail.com>
Notes
Notes: svn path=/head/; revision=267511
Diffstat (limited to 'share')
-rw-r--r--share/mk/bsd.subdir.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk
index b0ce12039088..f76d5e12321a 100644
--- a/share/mk/bsd.subdir.mk
+++ b/share/mk/bsd.subdir.mk
@@ -80,7 +80,11 @@ __subdir_targets=
__subdir_targets+= .WAIT
.else
__subdir_targets+= ${__target}_subdir_${__dir}
-${__target}_subdir_${__dir}: .MAKE
+__deps=
+.for __dep in ${SUBDIR_DEPEND_${__dir}}
+__deps+= ${__target}_subdir_${__dep}
+.endfor
+${__target}_subdir_${__dir}: .MAKE ${__deps}
.if !defined(NO_SUBDIR)
@${_+_}set -e; \
if test -d ${.CURDIR}/${__dir}.${MACHINE_ARCH}; then \