@@ -22,11 +22,11 @@ GIT_TAG = $(strip $(shell head="$(call GIT_REVISION)"; git tag --points-at $$hea
22
22
# ==> Functions
23
23
24
24
define CHECK_ERLANG_RELEASE
25
- $( Q ) erl -noshell -eval '{V,_} = string:to_integer(erlang:system_info(otp_release)), io:fwrite("~s", [is_integer(V) and (V >= 19)])' -s erlang halt | grep -q '^true'; \
25
+ erl -noshell -eval '{V,_} = string:to_integer(erlang:system_info(otp_release)), io:fwrite("~s", [is_integer(V) and (V >= 19)])' -s erlang halt | grep -q '^true'; \
26
26
if [ $$? != 0 ]; then \
27
27
echo "At least Erlang 19.0 is required to build Elixir"; \
28
28
exit 1; \
29
- fi;
29
+ fi
30
30
endef
31
31
32
32
define APP_TEMPLATE
@@ -56,14 +56,7 @@ UNICODE:=lib/elixir/ebin/Elixir.String.Unicode.beam
56
56
57
57
default : compile
58
58
59
- compile : lib/elixir/src/elixir.app.src erlang elixir
60
-
61
- lib/elixir/src/elixir.app.src : src/elixir.app.src
62
- $(Q ) $(call CHECK_ERLANG_RELEASE)
63
- $(Q ) rm -f lib/elixir/src/elixir.app.src
64
- $(Q ) echo " %% This file is automatically generated from <project_root>/src/elixir.app.src" \
65
- > lib/elixir/src/elixir.app.src
66
- $(Q ) cat src/elixir.app.src >> lib/elixir/src/elixir.app.src
59
+ compile : erlang elixir
67
60
68
61
erlang :
69
62
$(Q ) cd lib/elixir && $(REBAR ) compile
@@ -76,6 +69,7 @@ elixir: stdlib lib/eex/ebin/Elixir.EEx.beam mix ex_unit logger eex iex
76
69
stdlib : $(KERNEL ) VERSION
77
70
$(KERNEL ) : lib/elixir/lib/* .ex lib/elixir/lib/* /* .ex lib/elixir/lib/* /* /* .ex
78
71
$(Q ) if [ ! -f $( KERNEL) ]; then \
72
+ $(call CHECK_ERLANG_RELEASE) ; \
79
73
echo " ==> bootstrap (compile)" ; \
80
74
$(ERL ) -s elixir_compiler bootstrap -s erlang halt; \
81
75
fi
@@ -118,7 +112,6 @@ clean:
118
112
cd lib/elixir && $(REBAR ) clean
119
113
rm -rf ebin
120
114
rm -rf lib/* /ebin
121
- rm -f lib/elixir/src/elixir.app.src
122
115
$(Q ) $(MAKE ) clean_residual_files
123
116
124
117
clean_elixir :
0 commit comments