From e1e81b2b8bbd0049f2472bb7f7c5ce1e3c9864b7 Mon Sep 17 00:00:00 2001 From: Caveh Jalali Date: Thu, 12 Sep 2019 23:35:08 -0700 Subject: Makefile.rules: fix jobserver handling looks like make isn't smart enough to detect a recursive make invocation when the $(MAKE) command is buried inside a $(call ...) function resulting in: make[2]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. adding a '+' to give make the appropriate hint. BUG=none BRANCH=none TEST=make buildall -j still works, make no longer complains about jobserver Change-Id: Ia923a653e1ebf9cae7dae24a5b16f821b53e70b2 Signed-off-by: Caveh Jalali Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1803179 Reviewed-by: Daisuke Nojiri --- Makefile.rules | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.rules b/Makefile.rules index 2b081b1f76..4f5b54ad0b 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -31,6 +31,8 @@ _dir_create := $(foreach d,$(dirs) $(dirs-y),\ # V unset for normal output, V=1 for verbose output, V=0 for silent build # (warnings/errors only). Use echo thus: $(call echo,"stuff to echo") +# Note: if cmd_* includes a $(MAKE) invocation, use the '+' prefix +# to inherit parallel make execution: "+$(call quiet,...)" ifeq ($(V),0) Q := @ echo = echo -n; @@ -277,7 +279,7 @@ run-test-targets=$(foreach t,$(test-list-host),run-$(t)) $(host-test-targets): host-%: | $(FAILED_BOARDS_DIR) @touch $(FAILED_BOARDS_DIR)/test-$* - $(call quiet,host_test,BUILD ) + +$(call quiet,host_test,BUILD ) $(run-test-targets): run-%: host-% $(call quiet,run_host_test,TEST ) @@ -301,7 +303,7 @@ $(fuzz-test-targets): TEST_FLAG=TEST_FUZZ=y TEST_ASAN=$(TEST_ASAN) \ sed -e 's/[^-]*$$//') $(fuzz-test-targets): host-%: | $(FAILED_BOARDS_DIR) @touch $(FAILED_BOARDS_DIR)/test-$* - $(call quiet,host_test,BUILD ) + +$(call quiet,host_test,BUILD ) $(run-fuzz-test-targets): run-%: host-% $(call quiet,run_fuzz,TEST ) @rm -f $(FAILED_BOARDS_DIR)/test-$* -- cgit v1.2.1