@@ -4,6 +4,7 @@ ERLC := erlc -I lib/elixir/include
44ERL := erl -I lib/elixir/include -noshell -pa lib/elixir/ebin
55VERSION := $(strip $(shell cat VERSION) )
66INSTALL_PATH := /usr/local
7+ Q := @
78
89.PHONY : install compile erlang elixir dialyze test clean docs release_docs release_zip release_erl
910.NOTPARALLEL : compile
@@ -14,15 +15,15 @@ define APP_TEMPLATE
1415$(1 ) : lib/$(1 ) /ebin/Elixir.$(2 ) .beam lib/$(1 ) /ebin/$(1 ) .app
1516
1617lib/$(1 ) /ebin/$(1 ) .app:
17- @ cd lib/$(1 ) && ../../bin/elixir -e "Mix.Server.start_link(:dev)" -r mix.exs -e "Mix.Task.run('compile.app')"
18+ $( Q ) cd lib/$(1 ) && ../../bin/elixir -e "Mix.Server.start_link(:dev)" -r mix.exs -e "Mix.Task.run('compile.app')"
1819
1920lib/$(1 ) /ebin/Elixir.$(2 ) .beam: $(wildcard lib/$(1 ) /lib/* .ex) $(wildcard lib/$(1 ) /lib/* /* .ex) $(wildcard lib/$(1 ) /lib/* /* /* .ex)
2021 @ echo "==> $(1 ) (compile)"
21- @ $$(ELIXIRC ) "lib/$(1 ) /lib/**/*.ex" -o lib/$(1 ) /ebin
22+ $( Q ) $$(ELIXIRC ) "lib/$(1 ) /lib/**/*.ex" -o lib/$(1 ) /ebin
2223
2324test_$(1 ) : $(1 )
2425 @ echo "==> $(1 ) (exunit)"
25- @ cd lib/$(1 ) && ../../bin/elixir -r "test/test_helper.exs" -pr "test/**/*_test.exs";
26+ $( Q ) cd lib/$(1 ) && ../../bin/elixir -r "test/test_helper.exs" -pr "test/**/*_test.exs";
2627endef
2728
2829# ==> Compilation tasks
@@ -35,11 +36,11 @@ default: compile
3536compile : lib/elixir/src/elixir.app.src erlang elixir
3637
3738lib/elixir/src/elixir.app.src : src/elixir.app.src
38- @ rm -rf lib/elixir/src/elixir.app.src
39- @ cp src/elixir.app.src lib/elixir/src/elixir.app.src
39+ $( Q ) rm -rf lib/elixir/src/elixir.app.src
40+ $( Q ) cp src/elixir.app.src lib/elixir/src/elixir.app.src
4041
4142erlang :
42- @ cd lib/elixir && $(REBAR ) compile
43+ $( Q ) cd lib/elixir && $(REBAR ) compile
4344
4445# Since Mix depends on EEx and EEx depends on
4546# Mix, we first compile EEx without the .app
@@ -48,21 +49,21 @@ elixir: kernel lib/eex/ebin/Elixir.EEx.beam mix ex_unit eex iex
4849
4950kernel : $(KERNEL ) VERSION
5051$(KERNEL ) : lib/elixir/lib/* .ex lib/elixir/lib/* /* .ex
51- @ if [ ! -f $( KERNEL) ]; then \
52+ $( Q ) if [ ! -f $( KERNEL) ]; then \
5253 echo " ==> bootstrap (compile)" ; \
5354 $(ERL ) -s elixir_compiler core -s erlang halt; \
5455 fi
5556 @ echo " ==> kernel (compile)" ;
56- @ $(ELIXIRC ) " lib/elixir/lib/**/*.ex" -o lib/elixir/ebin;
57- @ $(MAKE ) unicode
58- @ rm -rf lib/elixir/ebin/elixir.app
59- @ cd lib/elixir && $(REBAR ) compile
57+ $( Q ) $(ELIXIRC ) " lib/elixir/lib/**/*.ex" -o lib/elixir/ebin;
58+ $( Q ) $(MAKE ) unicode
59+ $( Q ) rm -rf lib/elixir/ebin/elixir.app
60+ $( Q ) cd lib/elixir && $(REBAR ) compile
6061
6162unicode : $(UNICODE )
6263$(UNICODE ) : lib/elixir/priv/unicode.ex lib/elixir/priv/UnicodeData.txt lib/elixir/priv/NamedSequences.txt
6364 @ echo " ==> unicode (compile)" ;
6465 @ echo " This step can take up to a minute to compile in order to embed the Unicode database"
65- @ $(ELIXIRC ) lib/elixir/priv/unicode.ex -o lib/elixir/ebin;
66+ $( Q ) $(ELIXIRC ) lib/elixir/priv/unicode.ex -o lib/elixir/ebin;
6667
6768$(eval $(call APP_TEMPLATE,ex_unit,ExUnit))
6869$(eval $(call APP_TEMPLATE,eex,EEx))
@@ -81,7 +82,7 @@ install: compile
8182 ln -sf $(INSTALL_PATH ) /lib/elixir/bin/* $(INSTALL_PATH ) /bin
8283
8384clean :
84- @ cd lib/elixir && $(REBAR ) clean
85+ $( Q ) cd lib/elixir && $(REBAR ) clean
8586 rm -rf ebin
8687 rm -rf lib/* /ebin
8788 rm -rf lib/* /test/tmp
9394 rm -rf lib/elixir/test/ebin
9495
9596clean_exbeam :
96- @ rm -f lib/* /ebin/Elixir.* .beam
97+ $( Q ) rm -f lib/* /ebin/Elixir.* .beam
9798
9899# ==> Release tasks
99100
@@ -120,38 +121,38 @@ release_docs: docs
120121 mv docs ../elixir-lang.github.com/docs/master
121122
122123release_erl : compile
123- @ rm -rf rel/elixir
124- @ cd rel && ../rebar generate
124+ $( Q ) rm -rf rel/elixir
125+ $( Q ) cd rel && ../rebar generate
125126
126127# ==> Tests tasks
127128
128129test : test_erlang test_elixir
129130
130131test_erlang : compile
131132 @ echo " ==> elixir (eunit)"
132- @ mkdir -p lib/elixir/test/ebin
133- @ $(ERLC ) -pa lib/elixir/ebin -o lib/elixir/test/ebin lib/elixir/test/erlang/* .erl
134- @ $(ERL ) -pa lib/elixir/test/ebin -s test_helper test -s erlang halt;
133+ $( Q ) mkdir -p lib/elixir/test/ebin
134+ $( Q ) $(ERLC ) -pa lib/elixir/ebin -o lib/elixir/test/ebin lib/elixir/test/erlang/* .erl
135+ $( Q ) $(ERL ) -pa lib/elixir/test/ebin -s test_helper test -s erlang halt;
135136 @ echo
136137
137138test_elixir : test_kernel test_ex_unit test_doc_test test_mix test_eex test_iex
138139
139140test_doc_test : compile
140141 @ echo " ==> doctest (exunit)"
141- @ cd lib/elixir && ../../bin/elixir -r " test/doc_test.exs" ;
142+ $( Q ) cd lib/elixir && ../../bin/elixir -r " test/doc_test.exs" ;
142143
143144test_kernel : compile
144145 @ echo " ==> kernel (exunit)"
145- @ cd lib/elixir && ../../bin/elixir -r " test/elixir/test_helper.exs" -pr " test/elixir/**/*_test.exs" ;
146+ $( Q ) cd lib/elixir && ../../bin/elixir -r " test/elixir/test_helper.exs" -pr " test/elixir/**/*_test.exs" ;
146147
147148.dialyzer.base_plt :
148149 @ echo " ==> Adding Erlang/OTP basic applications to a new base PLT"
149- @ dialyzer --output_plt .dialyzer.base_plt --build_plt --apps erts kernel stdlib compiler syntax_tools inets crypto ssl
150+ $( Q ) dialyzer --output_plt .dialyzer.base_plt --build_plt --apps erts kernel stdlib compiler syntax_tools inets crypto ssl
150151
151152dialyze : .dialyzer.base_plt
152- @ rm -f .dialyzer_plt
153- @ cp .dialyzer.base_plt .dialyzer_plt
153+ $( Q ) rm -f .dialyzer_plt
154+ $( Q ) cp .dialyzer.base_plt .dialyzer_plt
154155 @ echo " ==> Adding Elixir to PLT..."
155- @ dialyzer --plt .dialyzer_plt --add_to_plt -r lib/elixir/ebin lib/ex_unit/ebin lib/mix/ebin lib/iex/ebin lib/eex/ebin
156+ $( Q ) dialyzer --plt .dialyzer_plt --add_to_plt -r lib/elixir/ebin lib/ex_unit/ebin lib/mix/ebin lib/iex/ebin lib/eex/ebin
156157 @ echo " ==> Dialyzing Elixir..."
157- @ dialyzer --plt .dialyzer_plt -r lib/elixir/ebin lib/ex_unit/ebin lib/mix/ebin lib/iex/ebin lib/eex/ebin
158+ $( Q ) dialyzer --plt .dialyzer_plt -r lib/elixir/ebin lib/ex_unit/ebin lib/mix/ebin lib/iex/ebin lib/eex/ebin
0 commit comments