From: Luis R. Rodriguez Date: Mon, 27 Feb 2012 20:13:14 +0000 (-0800) Subject: compat: fix parallel builds X-Git-Tag: compat-2012-07-02~1^2~69 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=9858c345cc154043cf81f551b70d15a3b80cc437;p=~emulex%2Fcompat.git 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 Signed-off-by: Luis R. Rodriguez --- diff --git a/Makefile b/Makefile index d96d098..d11da17 100644 --- 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