forked from ptuckey/stetson
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (48 loc) · 930 Bytes
/
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
#
# Targets
#
REBAR=`which rebar`
DEPS=deps/*/ebin
.PHONY: deps build
all: deps build
clean:
rm -rf ebin
$(REBAR) skip_deps=true clean
build:
$(REBAR) compile
$(MAKE) xref
deps:
$(REBAR) get-deps
test: build
rm -rf .eunit
$(REBAR) skip_deps=true eunit
#
# Run
#
ERL=exec erl -pa ebin $(DEPS) -sname stetson -boot start_sasl
.PHONY: boot noboot
boot: build
$(ERL) -s stetson
noboot: build
$(ERL)
#
# Analysis
#
PLT=./plt/current.plt
WARNINGS=-Werror_handling \
-Wrace_conditions \
-Wunderspecs \
-Wunmatched_returns
APPS=kernel stdlib sasl erts ssl \
tools os_mon runtime_tools crypto \
inets xmerl webtool snmp public_key \
mnesia eunit syntax_tools compiler
build-plt: all
dialyzer --build_plt --output_plt $(PLT) \
--apps $(APPS) $(DEPS)
dialyzer: build
dialyzer ebin --plt $(PLT) $(WARNINGS)
xref:
$(REBAR) skip_deps=true xref
typer:
typer --annotate --plt $(PLT) -I deps/ -r .