forked from elixir-lang/elixir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (48 loc) · 1.28 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Variables definitions:
# Variable definition recursively expanded when the variable is used,
# Not when it's declared
REBAR = $(shell which rebar || echo ./rebar)
DIALYZER = dialyzer
DIALYZER_WARNINGS = -Wunmatched_returns -Werror_handling \
-Wrace_conditions -Wunderspecs
ERL = erl -I include -noshell -pa ebin
# Variable definition expanded when it's declared
APP := elixir
# Mark deps and ebin as phony because
# they are managed by rebar.
.PHONY: deps ebin
# Disable parallel in compile
.NOTPARALLEL: compile
# Makefile targets format:
#
# target: dependencies
# [tab] system command
#
compile: deps ebin exbin
deps:
@ $(REBAR) get-deps
clean:
@ $(REBAR) clean
distclean:
@ $(REBAR) delete-deps
doc:
@ $(REBAR) doc skip_deps=true
docs: deps compile
@ bin/elixirc "lib/**/*.ex" --ignore-module-conflict --docs -o for_docs
@ rm -rf exbin
@ mv for_docs exbin
test: test_erlang test_elixir
test_erlang: deps compile
@ $(REBAR) skip_deps=true eunit
test_elixir: deps compile
@ echo "==> elixir (exunit)"
@ time bin/elixir -r "test/elixir/**/*_test.exs"
release: compile test
dialyzer --src src $(DIALYZER_WARNINGS)
ebin:
@ $(REBAR) compile
exbin: lib/*.ex lib/*/*.ex
@ rm -rf exbin
@ mkdir -p exbin
@ touch exbin
$(ERL) -s elixir_compiler core -s erlang halt