forked from tigertext/kafkerl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (51 loc) · 1.8 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
COOKIE ?= KAFKERL-EXAMPLE
CONFIG ?= rel/kafkerl.app.config
ERL ?= erl
RUN := ${ERL} -pa ebin -pa deps/*/ebin -smp enable -s lager -s kafkerl -setcookie ${COOKIE} -config ${CONFIG} -boot start_sasl ${ERL_ARGS}
NODE ?= kafkerl
CT_ARGS ?= "-vvv"
ERLARGS=-config ${CONFIG}
TEST_ERL_ARGS ?= ${ERLARGS}
REBAR ?= "rebar"
all:
${REBAR} get-deps compile
quick:
${REBAR} skip_deps=true compile
clean:
${REBAR} clean
quick_clean:
${REBAR} skip_deps=true clean
tests_clean:
rm -rf log/ct
clean_logs:
rm -rf log/*
${DIALYZER_OUT}:
dialyzer --verbose --build_plt -pa deps/*/ebin --output_plt ${DIALYZER_OUT} \
--apps stdlib erts compiler crypto edoc gs syntax_tools tools runtime_tools \
inets xmerl ssl mnesia webtool kernel
analyze: quick ${DIALYZER_OUT} xref
dialyzer --verbose --plt ${DIALYZER_OUT} -Werror_handling \
`find ebin -name "choosy*.beam" | grep -v SUITE | grep -v choosy_test_data_generation` \
`find deps/sumo_db/ebin -name "sumo*.beam" | grep -v SUITE` \
| grep -e "[^:][^:]*:[0-9][0-9]*[:]" --color=always --context=10000 | tee /dev/tty \
| grep -e "[^:][^:]*:[0-9][0-9]*[:]" | wc -l
quick_analyze: quick
dialyzer --verbose --plt ${DIALYZER_OUT} -Werror_handling \
`find ebin -name "choosy*.beam" | grep -v SUITE | grep -v choosy_test_data_generation` \
`find deps/sumo_db/ebin -name "sumo*.beam" | grep -v SUITE` \
| grep -e "[^:][^:]*:[0-9][0-9]*[:]" --color=always --context=10000 | tee /dev/tty \
| grep -e "[^:][^:]*:[0-9][0-9]*[:]" | wc -l
xref:
${REBAR} skip_deps=true --verbose compile xref
shell: quick
if [ -n "${NODE}" ]; then ${RUN} -name ${NODE}@`hostname`; \
else ${RUN}; \
fi
run: quick
if [ -n "${NODE}" ]; then ${RUN} -name ${NODE}@`hostname` -s kafkerl; \
else ${RUN} -s kafkerl; \
fi
test: tests
tests:
@${REBAR} compile skip_deps=true
${REBAR} -v 3 skip_deps=true ct