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 <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1803179
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
This commit is contained in:
Caveh Jalali 2019-09-12 23:35:08 -07:00 committed by Commit Bot
parent 50109efd01
commit e1e81b2b8b
1 changed files with 4 additions and 2 deletions

View File

@ -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-$*