CFR, CFT: Fine-grained SUBDIR dependencies for parallel builds
Ian Lepore
ian at FreeBSD.org
Mon May 26 14:48:59 UTC 2014
Based on a request from Justin Gibbs and suggestions from Jilles and
Warner on how to accomplish it, I've cobbled together a mechanism for
fine grained build order controls on parallel subdir builds. This
augments the coarse .WAIT mechanism, which is still useful if you've got
a situation where "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." Is this kind of mechanism acceptable to everyone?
I've updated 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/*.
This passed a universe run for me with -j12, but that takes about 5
hours so I can't run it through a lot of different -j numbers very
easily.
-- Ian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: subdir_depend.diff
Type: text/x-patch
Size: 5864 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20140526/2addbd24/attachment.bin>
More information about the freebsd-arch
mailing list