forked from esl/MongooseIM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
78 lines (53 loc) · 1.79 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
.PHONY: rel deps test show_test_results generate_snmp_header
EJABBERD_DIR = apps/ejabberd
EJD_INCLUDE = $(EJABBERD_DIR)/include
EJD_PRIV = $(EJABBERD_DIR)/priv
EJD_PRIV_MIB = $(EJD_PRIV)/mibs
EJD_MIB = $(EJABBERD_DIR)/mibs
all: deps compile
compile: rebar generate_snmp_header
./rebar compile
deps: rebar generate_snmp_header
./rebar get-deps
clean: rebar
./rebar clean
test: test/Makefile
cd test; make
test/Makefile:
git submodule update --init --recursive
show_test_results:
$$BROWSER `ls -td test/ct_report/ct_run.test@*/index.html | head -n 1` & disown
eunit: rebar
./rebar skip_deps=true eunit
rel: rebar deps
./rebar compile generate -f
devrel: rebar deps compile
mkdir -p dev
(cd rel && ../rebar generate -f target_dir=../dev/ejabberd)
cp apps/ejabberd/src/*.erl dev/ejabberd/lib/ejabberd-2.1.8/ebin/
cp -R `which erl`/../../lib/tools-* dev/ejabberd/lib/
devclean:
rm -rf dev/*
generate_snmp_header: apps/ejabberd/include/EJABBERD-MIB.hrl
$(EJD_INCLUDE)/EJABBERD-MIB.hrl: $(EJD_PRIV_MIB)/EJABBERD-MIB.bin
erlc -o $(EJD_INCLUDE) $<
$(EJD_PRIV_MIB)/EJABBERD-MIB.bin: $(EJD_MIB)/EJABBERD-MIB.mib $(EJD_MIB)/EJABBERD-MIB.funcs
erlc -o $(EJD_PRIV_MIB) $<
relclean:
rm -rf rel/ejabberd
COMBO_PLT = $(HOME)/.esl_ejabberd_combo_dialyzer_plt
PLT_LIBS = $(wildcard rel/ejabberd/lib/*/ebin)
DIALYZER_APPS = ejabberd
DIALYZER_APPS_PATHS = $(addsuffix /ebin, $(addprefix apps/, $(DIALYZER_APPS)))
check_plt: rel
dialyzer --check_plt --plt $(COMBO_PLT) $(PLT_LIBS)
build_plt: rel
dialyzer --build_plt --output_plt $(COMBO_PLT) $(PLT_LIBS)
dialyzer: compile
dialyzer -Wno_return --fullpath --plt $(COMBO_PLT) $(DIALYZER_APPS_PATHS) | \
fgrep -v -f ./dialyzer.ignore-warnings
cleanplt:
rm $(COMBO_PLT)
rebar:
wget -q http://cloud.github.com/downloads/basho/rebar/rebar
chmod u+x rebar