forked from esl/amoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
78 lines (57 loc) · 2.2 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 rel compile clean deploy prepare deps test ct eunit prop
all: rel deploy
rel: compile
./relx tar
compile: deps
./rebar compile
clean:
./rebar clean
rm -rf test/*.beam
deps:
./rebar get-deps
deps := $(wildcard deps/*/ebin)
deploy: rel
ansible-playbook -i hosts ansible/amoc-master.yml;
ansible-playbook -i hosts ansible/amoc-slaves.yml
prepare:
ansible-playbook -i hosts ansible/amoc-prepare.yml $(ARGS)
ct:
@if [ $$SUITE ]; then ./rebar skip_deps=true -v ct suite=$$SUITE; \
else ./rebar skip_deps=true -v ct; fi
prop_files := $(shell ls test/ | grep 'prop_.*\.erl')
prop:
@if [ $$PROP ]; then ct_run -logdir logs -pa ebin/ -pa deps/*/ebin/ -suite $$PROP; \
else ct_run -pa ebin/ -pa deps/*/ebin/ -suite $(prop_files); fi
eunit:
@if [ $$SUITE ]; then ./rebar skip_deps=true eunit suite=$$SUITE; \
else ./rebar skip_deps=true eunit; fi
test: compile eunit ct prop
console:
erl -pa ebin/ -pa deps/*/ebin
dialyzer/erlang.plt:
@mkdir -p dialyzer
@dialyzer --build_plt --output_plt dialyzer/erlang.plt \
-o dialyzer/erlang.log --apps kernel stdlib erts crypto compiler ssl; \
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
dialyzer/deps.plt:
@mkdir -p dialyzer
@dialyzer --build_plt --output_plt dialyzer/deps.plt \
-o dialyzer/deps.log $(deps); \
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
dialyzer/amoc.plt:
@mkdir -p dialyzer
@dialyzer --build_plt --output_plt dialyzer/amoc.plt \
-o dialyzer/amoc.log ebin; \
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
erlang_plt: dialyzer/erlang.plt
@dialyzer --plt dialyzer/erlang.plt --check_plt -o dialyzer/erlang.log; \
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
amoc_plt: dialyzer/amoc.plt
@dialyzer --plt dialyzer/amoc.plt --check_plt -o dialyzer/amoc.log; \
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
deps_plt: dialyzer/deps.plt
@dialyzer --plt dialyzer/deps.plt --check_plt -o dialyzer/deps.log; \
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
dialyzer: erlang_plt deps_plt amoc_plt
@dialyzer --plts dialyzer/*.plt --no_check_plt \
--get_warnings -o dialyzer/error.log ebin