-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
80 lines (61 loc) · 1.33 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
67
68
69
70
71
72
73
74
75
76
77
78
.PHONY: all clean dist-clean
.PHONY: get-deps update-deps
.PHONY: compile
.PHONY: test-unit test-ct check
.PHONY: build_plt dialyzer
REBAR_CMD = $(shell which ./rebar || which rebar)
REBAR = $(REBAR_CMD) -C rebar.config
DIALYZER = nice dialyzer
.DEFAULT_GOAL := all
all: get-deps compile
clean:
$(REBAR) clean
rm -rf ./ebin
rm -rf ./logs
rm -f ./erl_crash.dump
rm -rf ./.eunit
rm -f ./test/*.beam
dist-clean: clean
rm -rf ./deps
get-deps:
$(REBAR) get-deps
update-deps:
$(REBAR) update-deps
compile:
$(REBAR) compile
test-unit:
$(REBAR) eunit -v skip_deps=true
test-ct:
$(REBAR) ct skip_deps=true
check: test-unit test-ct
# Dialyzer
DIAAPPS = \
asn1 \
compiler \
crypto \
erts \
hipe \
inets \
kernel \
mnesia \
observer \
public_key \
sasl \
ssl \
stdlib \
syntax_tools \
tools \
webtool \
STD_PLT = $(HOME)/.dialyzer_plt
USE_PLT = erl_deps.plt
build_plt: all $(USE_PLT)
erl_std.plt:
cp ~/.erl_std.plt . || \
$(DIALYZER) --build_plt --apps $(DIAAPPS) --output_plt erl_std.plt
.SECONDARY: erl_deps.plt
erl_deps.plt: erl_std.plt
$(DIALYZER) --plt erl_std.plt --add_to_plt --apps $(DIAAPPS) --output_plt erl_std.plt
$(DIALYZER) -I deps --plt erl_std.plt --add_to_plt deps/*/ebin --output_plt erl_deps.plt
dialyzer: all $(USE_PLT)
$(DIALYZER) ebin -I deps --plts $(USE_PLT) | \
grep -vf .dialyzer-ignore-warnings