]> git.openfabrics.org - ~aditr/compat.git/commit
compat: fix parallel builds
authorLuis R. Rodriguez <mcgrof@frijolero.org>
Mon, 27 Feb 2012 20:13:14 +0000 (12:13 -0800)
committerLuis R. Rodriguez <mcgrof@frijolero.org>
Mon, 27 Feb 2012 21:26:44 +0000 (13:26 -0800)
commit9858c345cc154043cf81f551b70d15a3b80cc437
treed552ae26d6167b7d0bfcfca96e4a5e670c527863
parent77141618df2ca43ecbb7da8d2f40fd94d14033ff
compat: fix parallel builds

We broke parallel builds by breaking GNU Make's heuristics.
GNU Make does not whether or not target commands are sub-make
commands or not, these must be explicitly annotated. To tell
GNU Make that target command is going to be a sub-process
we can use the $(MAKE) variable for a command. Another option
is to tell GNU Make that a target command is *not* a sub-make
command instead explicitly by prepending a command with a plus,
"+" prior to the command. This will force GNU Make to avoid
supporting certain flags for those targets but more importantly,
it will also ensure that during execution of commands that are
*not* sub-make commands it will yield the jobserver to ensure
file descriptor / job sanity.

Annotate to GNU Make two commands that we issue are *not* sub-make
commands. This avoids stop the job server for these commands but
also allows GNU Make to figure out the heuristics to run the job
server for further sub-make commands -- in this case the recursive
call to make.

Reported-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
Makefile