-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
86 lines (61 loc) · 2.4 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
78
79
80
81
82
83
84
85
86
REBAR = $(shell pwd)/rebar
.PHONY: rel deps test
all: deps compile test compile-riak-test
compile: deps
$(REBAR) compile
compile-riak-test: compile
$(REBAR) skip_deps=true riak_test_compile
deps:
$(REBAR) get-deps
clean:
$(REBAR) clean
rm -rf riak_test/ebin
cleantests:
rm -rf riak_test/ebin
distclean: clean devclean relclean cleanplt
$(REBAR) delete-deps
rel: all
$(REBAR) generate
relnocert: export NO_CERTIFICATION = true
relnocert: relclean cleantests rel
relclean:
rm -rf rel/saturn_leaf
stage : rel
$(foreach dep,$(wildcard deps/*), rm -rf rel/saturn_leaf/lib/$(shell basename $(dep))-* && ln -sf $(abspath $(dep)) rel/saturn_leaf/lib;)
$(foreach app,$(wildcard apps/*), rm -rf rel/saturn_leaf/lib/$(shell basename $(app))-* && ln -sf $(abspath $(app)) rel/saturn_leaf/lib;)
currentdevrel: stagedevrel compile-riak-test
riak_test/bin/saturnleaf-current.sh
riak-test: currentdevrel
$(foreach dep,$(wildcard riak_test/*.erl), ../riak_test/riak_test -v -c saturn_leaf -t $(dep);)
stage-riak-test: all
$(foreach dep,$(wildcard riak_test/*.erl), ../riak_test/riak_test -v -c saturn_leaf -t $(dep);)
##
## Developer targets
##
## devN - Make a dev build for node N
## stagedevN - Make a stage dev build for node N (symlink libraries)
## devrel - Make a dev build for 1..$DEVNODES
## stagedevrel Make a stagedev build for 1..$DEVNODES
##
## Example, make a 68 node devrel cluster
## make stagedevrel DEVNODES=68
.PHONY : stagedevrel devrel
DEVNODES ?= 5
# 'seq' is not available on all *BSD, so using an alternate in awk
SEQ = $(shell awk 'BEGIN { for (i = 1; i < '$(DEVNODES)'; i++) printf("%i ", i); print i ;exit(0);}')
$(eval stagedevrel : $(foreach n,$(SEQ),stagedev$(n)))
$(eval devrel : $(foreach n,$(SEQ),dev$(n)))
dev% : all
mkdir -p dev
rel/gen_dev $@ rel/vars/dev_vars.config.src rel/vars/$@_vars.config
(cd rel && $(REBAR) generate target_dir=../dev/$@ overlay_vars=vars/$@_vars.config)
stagedev% : dev%
$(foreach dep,$(wildcard deps/*), rm -rf dev/$^/lib/$(shell basename $(dep))* && ln -sf $(abspath $(dep)) dev/$^/lib;)
$(foreach app,$(wildcard apps/*), rm -rf dev/$^/lib/$(shell basename $(app))* && ln -sf $(abspath $(app)) dev/$^/lib;)
devclean: clean
rm -rf dev
DIALYZER_APPS = kernel stdlib sasl erts ssl tools os_mon runtime_tools crypto inets \
xmerl webtool eunit syntax_tools compiler mnesia public_key snmp
include tools.mk
typer:
typer --annotate -I ../ --plt $(PLT) -r src