diff options
author | Loïc Hoguin <[email protected]> | 2018-11-27 11:43:07 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-11-27 11:43:07 +0100 |
commit | 8d0bf3b30b602b7f81f8d4749c5137440310e51f (patch) | |
tree | 8843447a66f5419d031817211eb3f15f0f75ee28 | |
parent | f07636e66759ecdaff4ee4e9097ecbf88eb6b217 (diff) | |
download | erlang.mk-8d0bf3b30b602b7f81f8d4749c5137440310e51f.tar.gz erlang.mk-8d0bf3b30b602b7f81f8d4749c5137440310e51f.tar.bz2 erlang.mk-8d0bf3b30b602b7f81f8d4749c5137440310e51f.zip |
Fix jobserver unavailable warnings
When the $(MAKE) is inside an $(eval $(call ...)) then it needs
to be escaped as $$(MAKE).
When the $(MAKE) is inside a $(call ...) then I did not figure
out a way other than passing it as an argument.
When the $(MAKE) is inside many levels of $(call $(call ...))
it's easier to avoid it if at all possible, so I replaced the
rebar $(MAKE) call with ./bootstrap. I confirmed it works fine
on Windows as well.
-rw-r--r-- | core/deps.mk | 2 | ||||
-rw-r--r-- | plugins/ct.mk | 2 | ||||
-rw-r--r-- | test/core_deps.mk | 16 |
3 files changed, 11 insertions, 9 deletions
diff --git a/core/deps.mk b/core/deps.mk index fa6ad84..4695912 100644 --- a/core/deps.mk +++ b/core/deps.mk @@ -215,7 +215,7 @@ define dep_autopatch_fetch_rebar2 git clone -q -n -- https://github.com/rebar/rebar $(ERLANG_MK_TMP)/rebar; \ cd $(ERLANG_MK_TMP)/rebar; \ git checkout -q 576e12171ab8d69b048b827b92aa65d067deea01; \ - $(MAKE); \ + ./bootstrap; \ cd -; \ fi endef diff --git a/plugins/ct.mk b/plugins/ct.mk index 3db994d..bc1d0bd 100644 --- a/plugins/ct.mk +++ b/plugins/ct.mk @@ -54,7 +54,7 @@ endif ifneq ($(ALL_APPS_DIRS),) define ct_app_target apps-ct-$1: test-build - $(MAKE) -C $1 ct IS_APP=1 + $$(MAKE) -C $1 ct IS_APP=1 endef $(foreach app,$(ALL_APPS_DIRS),$(eval $(call ct_app_target,$(app)))) diff --git a/test/core_deps.mk b/test/core_deps.mk index 79e1e9b..a27a2b4 100644 --- a/test/core_deps.mk +++ b/test/core_deps.mk @@ -623,7 +623,7 @@ define add_dep_and_subdep $i "Bootstrap a new OTP library named $(APP)_$(1)subdep" $t mkdir $(APP)_$(1)subdep/ $t cp ../erlang.mk $(APP)_$(1)subdep/ - $t $(MAKE) -C $(APP)_$(1)subdep --no-print-directory -f erlang.mk bootstrap-lib $$v + $t $2 -C $(APP)_$(1)subdep --no-print-directory -f erlang.mk bootstrap-lib $$v $i "Create a Git repository for $(APP)_$(1)subdep" $t (cd $(APP)_$(1)subdep && \ @@ -636,7 +636,7 @@ define add_dep_and_subdep $i "Bootstrap a new OTP library named $(APP)_$(1)dep" $t mkdir $(APP)_$(1)dep/ $t cp ../erlang.mk $(APP)_$(1)dep/ - $t $(MAKE) -C $(APP)_$(1)dep --no-print-directory -f erlang.mk bootstrap-lib $$v + $t $2 -C $(APP)_$(1)dep --no-print-directory -f erlang.mk bootstrap-lib $$v $i "Add $(APP)_$(1)subdep as a dependency" $t perl -ni.bak -e \ @@ -655,11 +655,13 @@ endef core-deps-list-deps: build clean - $(call add_dep_and_subdep,) - $(call add_dep_and_subdep,doc) - $(call add_dep_and_subdep,rel) - $(call add_dep_and_subdep,test) - $(call add_dep_and_subdep,shell) +# We pass $(MAKE) directly so that GNU Make can pass its context forward. +# If we didn't then $(MAKE) would be expanded in the call without context. + $(call add_dep_and_subdep,,$(MAKE)) + $(call add_dep_and_subdep,doc,$(MAKE)) + $(call add_dep_and_subdep,rel,$(MAKE)) + $(call add_dep_and_subdep,test,$(MAKE)) + $(call add_dep_and_subdep,shell,$(MAKE)) $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ |