Fix parallel build for cmm
This is the wildcard recipe for the "all" target:
%/all:
$(MAKE) -C $* all
The following recipe for "cmm/all" had priority over the more general
recipe for the "%/all" target.
cmm/all: fci/lib/install
@
The resulting recipe for "cmm/all" was basically a noop. Nothing got
built.
After the "all" target has been remade, Make would execute the "install"
recipe which basically runs the following two commands in parallel.
make -C cmm DESTDIR=staging/ install
make -C cmm DESTDIR=target/ install
The Makefile in the "cmm" subdirectory defines the "all" target as a
prerequisite of the "install" target and therefore builds the same
before running the "install" recipe. As a result, two instances of make
are trying to re-make the "all" target at the same time which wreaks
havoc.
To fix this problem, change the definition of "cmm/all" from a recipe to
a definition of a dependency. Make will now run a single instance of
"$(MAKE) -C $* all" before running two instances for the "install"
targets concurrently.
Change-Id: I20561c6bd0fbeeeaaf30bbffb6497bfdc9b4f31f
1 file changed