-
Notifications
You must be signed in to change notification settings - Fork 429
/
Makefile
79 lines (60 loc) · 1.77 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
.PHONY: rel
RUN=./tools/silent_exec.sh "[email protected]"
XEP_TOOL = tools/xep_tool
EBIN = ebin
DEVNODES = mim1 mim2 mim3 fed1 reg1
REBAR=./rebar3
# Top-level targets aka user interface
all: rel
clean:
-$(REBAR) clean
-rm -rf _build
-rm -rf asngen
-rm configure.out
-rm rel/configure.vars.config
# REBAR_CT_EXTRA_ARGS comes from a test runner
ct:
@(if [ "$(SUITE)" ]; \
then $(RUN) $(REBAR) ct --dir test --suite $(SUITE) ; \
else $(RUN) $(REBAR) ct $(REBAR_CT_EXTRA_ARGS); fi)
eunit:
@$(RUN) $(REBAR) eunit $(REBAR_EUNIT_EXTRA_ARGS)
rel: certs configure.out rel/configure.vars.config
. ./configure.out && $(REBAR) as prod release
shell: certs
$(REBAR) shell
# Top-level targets' dependency chain
rock:
@if [ "$(FILE)" ]; then elvis rock $(FILE);\
elif [ "$(BRANCH)" ]; then tools/rock_changed.sh $(BRANCH); \
else tools/rock_changed.sh; fi
## Don't allow these files to go out of sync!
configure.out rel/configure.vars.config:
./tools/configure with-all without-jingle-sip
devrel: $(DEVNODES)
print_devnodes:
@echo $(DEVNODES)
$(DEVNODES): certs configure.out rel/vars-toml.config
@echo "building $@"
(. ./configure.out && \
DEVNODE=true $(RUN) $(REBAR) as $@ release)
maybe_clean_certs:
if [ "$$SKIP_CERT_BUILD" != 1 ]; then \
if ! openssl x509 -checkend 36000 -noout -in tools/ssl/ca/cacert.pem ; then \
cd tools/ssl && make clean_certs; \
fi \
fi
certs: maybe_clean_certs
if [ "$$SKIP_CERT_BUILD" = 1 ]; then \
echo "Skip cert build"; \
else \
cd tools/ssl && make; \
fi
xeplist:
$(XEP_TOOL)/xep_tool.escript doap doc/mongooseim.doap
$(XEP_TOOL)/xep_tool.escript json doc/supported-xeps.json
$(XEP_TOOL)/xep_tool.escript markdown doc/user-guide/Supported-XEPs.md
install: configure.out rel
@. ./configure.out && tools/install
elvis:
$(REBAR) as lint lint