Update Erlang.mk

This commit is contained in:
Loïc Hoguin 2025-03-20 15:24:05 +01:00
parent 22e4853e7d
commit b34a7227b3
No known key found for this signature in database
GPG Key ID: C69E26E3A9DF618F
1 changed files with 9 additions and 2 deletions

11
erlang.mk vendored
View File

@ -17,7 +17,7 @@
ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST)))
export ERLANG_MK_FILENAME
ERLANG_MK_VERSION = 69fa181
ERLANG_MK_VERSION = e13b4c7
ERLANG_MK_WITHOUT =
# Make 3.81 and 3.82 are deprecated.
@ -669,6 +669,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 \
@ -1784,7 +1786,12 @@ export ELIXIR
ifeq ($(ELIXIR),system)
# We expect 'elixir' to be on the path.
ELIXIR_LIBS ?= $(dir $(shell readlink -f `which elixir`))/../lib
ELIXIR_BIN ?= $(shell readlink -f `which elixir`)
ELIXIR_LIBS ?= $(abspath $(dir $(ELIXIR_BIN))/../lib)
# Fallback in case 'elixir' is a shim.
ifeq ($(wildcard $(ELIXIR_LIBS)/elixir/),)
ELIXIR_LIBS = $(abspath $(shell elixir -e 'IO.puts(:code.lib_dir(:elixir))')/../)
endif
ELIXIR_LIBS := $(ELIXIR_LIBS)
export ELIXIR_LIBS
ERL_LIBS := $(ERL_LIBS):$(ELIXIR_LIBS)