-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
60 lines (46 loc) · 1.29 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
ERL_LIB_DIR = $(shell erl -eval 'io:format(code:lib_dir()), init:stop().' -noshell)
PLT_APPS = $(shell ls $(ERL_LIB_DIR) | grep -v interface | grep -v tsung | sed -e 's/-[0-9.]*//')
DIALYZER_OPTS = -Wno_undefined_callbacks --fullpath
ERL_FLAGS = "-config test.config"
REBAR = ./rebar
.PHONY: all build_plt compile compile-fast doc clean depclean distclean \
dialyze nuke test build-travis dialyzer-travis
all: compile
build_plt:
@dialyzer --build_plt --apps $(PLT_APPS) ; \
if [ $$? -eq 2 ] ; then \
echo "Ignoring build_plt warnings" ; \
elif [ $$? -ne 0 ] ; then \
echo "Error during build_plt" ; exit 1 ; \
fi
clean:
@$(REBAR) skip_deps=true clean
compile: deps
@$(REBAR) compile
compile-fast:
@$(REBAR) skip_deps=true compile
deps:
@$(REBAR) get-deps update-deps
doc:
@$(REBAR) skip_deps=true doc
depclean:
@$(REBAR) clean
distclean:
@$(REBAR) clean delete-deps
@rm -rf logs
dialyze:
@dialyzer $(DIALYZER_OPTS) -r ebin
nuke:
@rm -rf deps
@git clean -f -d
test:
@ERL_FLAGS=$(ERL_FLAGS) $(REBAR) skip_deps=true ct verbose=1
build-travis:
${MAKE} nuke
${MAKE} deps
${MAKE} compile
${MAKE} test
${MAKE} dialyzer-travis
${MAKE} dialyze
dialyzer-travis:
@curl -L "https://github.com/esl/erlang-plts/blob/master/plts/travis-erlang-r16b02.plt?raw=true" -o /home/travis/.dialyzer_plt