]> git.openfabrics.org - ~emulex/compat.git/commitdiff
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)
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

index d96d098092212cba7aa497edfedea301babc4aa0..d11da17d354c545ca1901c3caf7944938ee64bf0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -62,8 +62,8 @@ install: modules
 $(COMPAT_AUTOCONF): ;
 
 $(COMPAT_CONFIG):
-       @$(PWD)/scripts/gen-compat-config.sh > $(PWD)/$(COMPAT_CONFIG)
-       @$(PWD)/scripts/gen-compat-autoconf.sh $(COMPAT_CONFIG) > $(PWD)/$(COMPAT_AUTOCONF)
+       +@$(PWD)/scripts/gen-compat-config.sh > $(PWD)/$(COMPAT_CONFIG)
+       +@$(PWD)/scripts/gen-compat-autoconf.sh $(COMPAT_CONFIG) > $(PWD)/$(COMPAT_AUTOCONF)
        @$(MAKE) -C $(PWD) modules
 
 install: modules