Skip to content

Commit b902eb5

Browse files
lhoguinikavgo
authored andcommitted
Update Erlang.mk
1 parent 909f7f4 commit b902eb5

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

erlang.mk

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST)))
1818
export ERLANG_MK_FILENAME
1919

20-
ERLANG_MK_VERSION = 69fa181
20+
ERLANG_MK_VERSION = e13b4c7
2121
ERLANG_MK_WITHOUT =
2222

2323
# Make 3.81 and 3.82 are deprecated.
@@ -669,6 +669,8 @@ define dep_autopatch_detect
669669
echo mix; \
670670
elif [ -f $(DEPS_DIR)/$1/rebar.lock -o -f $(DEPS_DIR)/$1/rebar.config ]; then \
671671
echo rebar3; \
672+
elif [ -f $(DEPS_DIR)/$1/Makefile ]; then \
673+
echo noop; \
672674
else \
673675
exit 99; \
674676
fi \
@@ -1784,7 +1786,12 @@ export ELIXIR
17841786

17851787
ifeq ($(ELIXIR),system)
17861788
# We expect 'elixir' to be on the path.
1787-
ELIXIR_LIBS ?= $(dir $(shell readlink -f `which elixir`))/../lib
1789+
ELIXIR_BIN ?= $(shell readlink -f `which elixir`)
1790+
ELIXIR_LIBS ?= $(abspath $(dir $(ELIXIR_BIN))/../lib)
1791+
# Fallback in case 'elixir' is a shim.
1792+
ifeq ($(wildcard $(ELIXIR_LIBS)/elixir/),)
1793+
ELIXIR_LIBS = $(abspath $(shell elixir -e 'IO.puts(:code.lib_dir(:elixir))')/../)
1794+
endif
17881795
ELIXIR_LIBS := $(ELIXIR_LIBS)
17891796
export ELIXIR_LIBS
17901797
ERL_LIBS := $(ERL_LIBS):$(ELIXIR_LIBS)

0 commit comments

Comments
 (0)