|
17 | 17 | ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST))) |
18 | 18 | export ERLANG_MK_FILENAME |
19 | 19 |
|
20 | | -ERLANG_MK_VERSION = e13b4c7 |
| 20 | +ERLANG_MK_VERSION = f157f11 |
21 | 21 | ERLANG_MK_WITHOUT = |
22 | 22 |
|
23 | 23 | # Make 3.81 and 3.82 are deprecated. |
@@ -559,6 +559,14 @@ export ERL_LIBS |
559 | 559 |
|
560 | 560 | export NO_AUTOPATCH |
561 | 561 |
|
| 562 | +# Elixir. |
| 563 | + |
| 564 | +# Elixir is automatically enabled in all cases except when |
| 565 | +# an Erlang project uses an Elixir dependency. In that case |
| 566 | +# $(ELIXIR) must be set explicitly. |
| 567 | +ELIXIR ?= $(if $(filter elixir,$(BUILD_DEPS) $(DEPS)),dep,$(if $(EX_FILES),system,disable)) |
| 568 | +export ELIXIR |
| 569 | + |
562 | 570 | # Verbosity. |
563 | 571 |
|
564 | 572 | dep_verbose_0 = @echo " DEP $1 ($(call query_version,$1))"; |
@@ -1778,12 +1786,6 @@ endif |
1778 | 1786 | # Copyright (c) 2024, Loïc Hoguin <[email protected]> |
1779 | 1787 | # This file is part of erlang.mk and subject to the terms of the ISC License. |
1780 | 1788 |
|
1781 | | -# Elixir is automatically enabled in all cases except when |
1782 | | -# an Erlang project uses an Elixir dependency. In that case |
1783 | | -# $(ELIXIR) must be set explicitly. |
1784 | | -ELIXIR ?= $(if $(filter elixir,$(BUILD_DEPS) $(DEPS)),dep,$(if $(EX_FILES),system,disable)) |
1785 | | -export ELIXIR |
1786 | | - |
1787 | 1789 | ifeq ($(ELIXIR),system) |
1788 | 1790 | # We expect 'elixir' to be on the path. |
1789 | 1791 | ELIXIR_BIN ?= $(shell readlink -f `which elixir`) |
@@ -1964,6 +1966,7 @@ endef |
1964 | 1966 | define compile_ex.erl |
1965 | 1967 | {ok, _} = application:ensure_all_started(elixir), |
1966 | 1968 | {ok, _} = application:ensure_all_started(mix), |
| 1969 | + $(foreach dep,$(LOCAL_DEPS),_ = application:load($(dep)),) |
1967 | 1970 | ModCode = list_to_atom("Elixir.Code"), |
1968 | 1971 | ModCode:put_compiler_option(ignore_module_conflict, true), |
1969 | 1972 | ModComp = list_to_atom("Elixir.Kernel.ParallelCompiler"), |
|
0 commit comments