diff options
author | Loïc Hoguin <[email protected]> | 2025-03-19 11:58:06 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2025-03-19 11:58:06 +0100 |
commit | a5e7fd2ed1f7d756edee8e19af8bb639e1287ee6 (patch) | |
tree | a9c761819dcc233c6b96cdb19ae30328d0121636 | |
parent | 69fa1814e438bf122d584b90ac51c3af391ea475 (diff) | |
download | erlang.mk-a5e7fd2ed1f7d756edee8e19af8bb639e1287ee6.tar.gz erlang.mk-a5e7fd2ed1f7d756edee8e19af8bb639e1287ee6.tar.bz2 erlang.mk-a5e7fd2ed1f7d756edee8e19af8bb639e1287ee6.zip |
Don't fail Mix autopatch if Elixir is disabled but it has a Makefile
-rw-r--r-- | core/deps.mk | 2 | ||||
-rw-r--r-- | test/core_elixir.mk | 16 |
2 files changed, 18 insertions, 0 deletions
diff --git a/core/deps.mk b/core/deps.mk index d2719e5..8b158b7 100644 --- a/core/deps.mk +++ b/core/deps.mk @@ -252,6 +252,8 @@ define dep_autopatch_detect echo mix; \ elif [ -f $(DEPS_DIR)/$1/rebar.lock -o -f $(DEPS_DIR)/$1/rebar.config ]; then \ echo rebar3; \ + elif [ -f $(DEPS_DIR)/$1/Makefile ]; then \ + echo noop; \ else \ exit 99; \ fi \ diff --git a/test/core_elixir.mk b/test/core_elixir.mk index 1ed23b6..f583aeb 100644 --- a/test/core_elixir.mk +++ b/test/core_elixir.mk @@ -117,6 +117,22 @@ core-elixir-disable-autopatch-fail: init $i "Building the application should fail" $t ! $(MAKE) -C $(APP) $v +core-elixir-disable-autopatch-make: init + + $i "Bootstrap a new OTP library named $(APP)" + $t mkdir $(APP)/ + $t cp ../erlang.mk $(APP)/ + $t $(MAKE) -C $(APP) -f erlang.mk bootstrap-lib $v + + $i "Add Reloader to the list of dependencies" + $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = reloader\ndep_reloader = git https://github.com/2600hz/erlang-reloader de1e6c74204b61ccf3b3652f05c6a7dec9e8257d\n"}' $(APP)/Makefile + + $i "Disable Elixir in the Makefile" + $t perl -ni.bak -e 'print;if ($$.==1) {print "ELIXIR = disable\n"}' $(APP)/Makefile + + $i "Building the application should work as Reloader contains a proper Makefile" + $t $(MAKE) -C $(APP) $v + core-elixir-disable-autopatch-rebar3: init $i "Bootstrap a new OTP library named $(APP)" |