forked from AntidoteDB/antidote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
94 lines (70 loc) · 2.15 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
REBAR = $(shell pwd)/rebar3
.PHONY: rel test relgentlerain
all: compile
compile:
$(REBAR) compile
clean:
$(REBAR) clean
distclean: clean relclean
$(REBAR) clean --all
cleantests:
rm -f test/utils/*.beam
rm -f test/singledc/*.beam
rm -f test/multidc/*.beam
rm -rf logs/
shell:
$(REBAR) shell --name='[email protected]' --setcookie antidote --config config/sys-debug.config
# same as shell, but automatically reloads code when changed
# to install add `{plugins, [rebar3_auto]}.` to ~/.config/rebar3/rebar.config
# the tool requires inotifywait (sudo apt install inotify-tools)
# see https://github.com/vans163/rebar3_auto or http://blog.erlware.org/rebar3-auto-comile-and-load-plugin/
auto:
$(REBAR) auto --name='[email protected]' --setcookie antidote --config config/sys-debug.config
rel:
$(REBAR) release
relclean:
rm -rf _build/default/rel
reltest: rel
test/release_test.sh
# style checks
lint:
${REBAR} as lint lint
check: distclean cleantests test reltest dialyzer lint
relgentlerain: export TXN_PROTOCOL=gentlerain
relgentlerain: relclean cleantests rel
relnocert: export NO_CERTIFICATION=true
relnocert: relclean cleantests rel
stage :
$(REBAR) release -d
compile-utils: compile
for filename in "test/utils/*.erl" ; do \
erlc -o test/utils $$filename ; \
done
test:
mkdir -p eunit_logs
${REBAR} eunit skip_deps=true
coverage:
${REBAR} cover --verbose
singledc: compile-utils rel
rm -f test/singledc/*.beam
mkdir -p logs
ifdef SUITE
ct_run -pa ./_build/default/lib/*/ebin test/utils/ -logdir logs -suite test/singledc/${SUITE} -cover test/antidote.coverspec
else
ct_run -pa ./_build/default/lib/*/ebin test/utils/ -logdir logs -dir test/singledc -cover test/antidote.coverspec
endif
multidc: compile-utils rel
rm -f test/multidc/*.beam
mkdir -p logs
ifdef SUITE
ct_run -pa ./_build/default/lib/*/ebin test/utils/ -logdir logs -suite test/multidc/${SUITE} -cover test/antidote.coverspec
else
ct_run -pa ./_build/default/lib/*/ebin test/utils/ -logdir logs -dir test/multidc -cover test/antidote.coverspec
endif
systests: singledc multidc
docs:
${REBAR} doc skip_deps=true
xref: compile
${REBAR} xref skip_deps=true
dialyzer:
${REBAR} dialyzer