aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2025-03-19 11:58:06 +0100
committerLoïc Hoguin <[email protected]>2025-03-20 12:40:48 +0100
commit9f43c7fdbf0ae84a173be112c1c6a712ddde28c7 (patch)
tree59e33ab9a0f0a8a1c8dbe23d78c37b9947e79a3c
parent69fa1814e438bf122d584b90ac51c3af391ea475 (diff)
downloaderlang.mk-9f43c7fdbf0ae84a173be112c1c6a712ddde28c7.tar.gz
erlang.mk-9f43c7fdbf0ae84a173be112c1c6a712ddde28c7.tar.bz2
erlang.mk-9f43c7fdbf0ae84a173be112c1c6a712ddde28c7.zip
Don't fail Mix autopatch if Elixir is disabled but it has a Makefile
-rw-r--r--core/deps.mk2
-rw-r--r--test/core_elixir.mk21
2 files changed, 23 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..6a6997b 100644
--- a/test/core_elixir.mk
+++ b/test/core_elixir.mk
@@ -117,6 +117,27 @@ 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
+
+ $i "Confirm Reloader was built"
+ $t test -f $(APP)/deps/reloader/ebin/dep_built
+ $t test -f $(APP)/deps/reloader/ebin/reloader.app
+ $t test -f $(APP)/deps/reloader/ebin/reloader.beam
+
core-elixir-disable-autopatch-rebar3: init
$i "Bootstrap a new OTP library named $(APP)"