forked from cybergrind/rebar-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
project_Makefile
70 lines (50 loc) · 1.09 KB
/
project_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
ERL ?= erl
ERLC = erlc
EBIN_DIRS := $(wildcard deps/*/ebin)
APPS := $(shell dir apps)
REL_DIR = rel
NODE = {{name}}
REL = {{name}}
SCRIPT_PATH := $(REL_DIR)/$(NODE)/bin/$(REL)
.PHONY: rel deps
all: deps compile
compile: deps
@rebar compile
deps:
@rebar get-deps
@rebar check-deps
clean:
@rebar clean
realclean: clean
@rebar delete-deps
test:
@rebar skip_deps=true ct
rel: deps
@rebar compile generate
start: $(SCRIPT_PATH)
@./$(SCRIPT_PATH) start
stop: $(SCRIPT_PATH)
@./$(SCRIPT_PATH) stop
ping: $(SCRIPT_PATH)
@./$(SCRIPT_PATH) ping
attach: $(SCRIPT_PATH)
@./$(SCRIPT_PATH) attach
console: $(SCRIPT_PATH)
@./$(SCRIPT_PATH) console
restart: $(SCRIPT_PATH)
@./$(SCRIPT_PATH) restart
reboot: $(SCRIPT_PATH)
@./$(SCRIPT_PATH) reboot
doc:
rebar skip_deps=true doc
for app in $(APPS); do \
cp -R apps/$${app}/doc doc/$${app}; \
done;
dev:
@erl -pa ebin include deps/*/ebin deps/*/include ebin include -boot start_sasl
analyze: checkplt
@rebar skip_deps=true dialyze
buildplt:
@rebar skip_deps=true build-plt
checkplt: buildplt
@rebar skip_deps=true check-plt