-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
82 lines (65 loc) · 2.17 KB
/
Copy pathMakefile
File metadata and controls
82 lines (65 loc) · 2.17 KB
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
APPNAME=wa
REBAR=./rebar
ERLC=erlc
COOKIE=gRPZkPvMUvHuBMn0Leuw8vzK0yeK5Cu1
MIB_PATH=priv/snmp/mibs
MIB_OPTS=+'{group_check, false}' +'{il, ["otp_mibs/priv/mibs/"]}'
PLT_NAME=.$(APPNAME)_dialyzer.plt
ERLANG_DIALYZER_APPS = asn1 \
compiler \
crypto \
edoc \
edoc \
erts \
eunit \
eunit \
gs \
hipe \
inets \
kernel \
mnesia \
snmp \
snmpa \
snmpc \
observer \
public_key \
runtime_tools \
runtime_tools \
ssl \
stdlib \
syntax_tools \
syntax_tools \
tools \
webtool \
os_mon \
xmerl
DEPS_DIALYZER_APPS = alog gproc epgsql poolboy reloader
.PHONY:deps
all: deps compile
./rebar:
erl -noshell -s inets start -s ssl start \
-eval 'httpc:request(get, {"http://github.com/downloads/basho/rebar/rebar", []}, [], [{stream, "./rebar"}])' \
-s inets stop -s init stop
chmod +x ./rebar
compile: $(REBAR)
@$(REBAR) compile
clean: $(REBAR)
@$(REBAR) clean
deps: $(REBAR)
@$(REBAR) check-deps || (export GPROC_DIST=true; $(REBAR) get-deps)
pub: $(REBAR)
@$(REBAR) generate
run:
erl +A 4 -set_cookie $(COOKIE) -config priv/sys -pa ebin edit deps/*/ebin -boot start_sasl -sname $(APPNAME)@localhost -s $(APPNAME)
run-local:
erl +A 4 -set_cookie $(COOKIE) -config priv/local.sys -pa ebin edit deps/*/ebin -boot start_sasl -sname $(APPNAME)@localhost -s $(APPNAME) -s sync
mibs: $(MIBS)
mv *.bin $(MIB_PATH)
mibs_clean:
rm -f $(MIB_PATH)/*.bin
$(MIB_PATH)/%.bin: $(MIB_PATH)/%.mib
$(ERLC) $(MIB_OPTS) $< -o $@
$(PLT_NAME):
dialyzer --output_plt $(PLT_NAME) --build_plt --apps $(ERLANG_DIALYZER_APPS) -r deps
dialyzer: $(PLT_NAME)
dialyzer --plt $(PLT_NAME) -Wrace_conditions --src src