-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (47 loc) · 1.34 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
.PHONY: rel deps test plugins
APP = emqttd
BASE_DIR = $(shell pwd)
REBAR = $(BASE_DIR)/rebar
DIST = $(BASE_DIR)/rel/$(APP)
all: submods compile
submods:
@git submodule update --init
compile: deps
@$(REBAR) compile
deps:
@$(REBAR) get-deps
update-deps:
@$(REBAR) update-deps
xref:
@$(REBAR) xref skip_deps=true
clean:
@$(REBAR) clean
test:
ERL_FLAGS="-config rel/files/emqttd.test.config" $(REBAR) -v skip_deps=true ct
#$(REBAR) skip_deps=true eunit
edoc:
@$(REBAR) doc
rel: compile
@cd rel && $(REBAR) generate -f
plugins:
@for plugin in ./plugins/* ; do \
if [ -d $${plugin} ]; then \
mkdir -p $(DIST)/$${plugin}/ ; \
cp -R $${plugin}/ebin $(DIST)/$${plugin}/ ; \
[ -d "$${plugin}/priv" ] && cp -R $${plugin}/priv $(DIST)/$${plugin}/ ; \
[ -d "$${plugin}/etc" ] && cp -R $${plugin}/etc $(DIST)/$${plugin}/ ; \
echo "$${plugin} copied" ; \
fi \
done
dist: rel plugins
PLT = $(BASE_DIR)/.emqttd_dialyzer.plt
APPS = erts kernel stdlib sasl crypto ssl os_mon syntax_tools \
public_key mnesia inets compiler
check_plt: compile
dialyzer --check_plt --plt $(PLT) --apps $(APPS) \
deps/*/ebin ./ebin plugins/*/ebin
build_plt: compile
dialyzer --build_plt --output_plt $(PLT) --apps $(APPS) \
deps/*/ebin ./ebin plugins/*/ebin
dialyzer: compile
dialyzer -Wno_return --plt $(PLT) deps/*/ebin ./ebin plugins/*/ebin