diff options
author | Badlop <badlop@process-one.net> | 2021-07-15 01:29:35 +0200 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2021-07-16 16:43:08 +0200 |
commit | 937e1c2e373e360fe47e455886d186492248f31f (patch) | |
tree | 1d68d301f3fc72bc9ea5609c8ac5f577218300b5 /Makefile.in | |
parent | As Mix config now must be evaluated at runtime, rename to runtime.exs (diff) |
Add workaround so rebar2 can use Elixir 1.12.0
Notice that Elixir 1.12.0 requires Erlang/OTP 21 or higher
BTW, this workaround works only with rebar2... unfortunately
rebar3 doesn't compile the elixir files from lib/
Diffstat (limited to '')
-rw-r--r-- | Makefile.in | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in index c39195ac..ac8c0b45 100644 --- a/Makefile.in +++ b/Makefile.in @@ -130,6 +130,7 @@ ifeq "$(IS_REBAR)" "3" EBINDIR=$(DEPSDIR)/ejabberd/ebin REBARREL=$(REBAR) as prod tar REBARDEV=REBAR_PROFILE=dev $(REBAR) release + ELIXIR_WARNING="\033[32m===>\033[00m If you get \033[1;91mDependency failure: source for elixir...\033[00m, please run \033[4;37mmake\033[00m again" else SKIPDEPS=skip_deps=true LISTDEPS=-q list-deps @@ -142,12 +143,23 @@ else EBINDIR=ebin REBARREL=$(REBAR) generate REBARDEV= + ELIXIR_WARNING="\033[32m===>\033[00m If you get \033[1;91mERROR: Dependency dir .../elixir failed...\033[00m, please run \033[4;37mmake\033[00m again" endif endif all: deps src -deps: $(DEPSDIR)/.got +deps: elixir-rebar $(DEPSDIR)/.got + +elixir-rebar: + @[ @elixir@ = true ] \ + && ( [ ! -d $(DEPSDIR)/elixir/ ] \ + && echo $(ELIXIR_WARNING) \ + || ( [ ! -f $(DEPSDIR)/elixir/rebar.config ] \ + && { mkdir $(DEPSDIR)/elixir/src ; \ + cp lib/elixir.app.src $(DEPSDIR)/elixir/src/ ; \ + cp lib/rebar.config $(DEPSDIR)/elixir/ ; } \ + || true ) ) || true $(DEPSDIR)/.got: rm -rf $(DEPSDIR)/.got |