Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 80 lines (62 sloc) 1.574 kb
f3f8f29 @kejv Improve test targets in Makefile
kejv authored
1 .PHONY: clean dialyzer_warnings xref_warnings deps test test_eunit test_inttest
35ef363 @tuncer Refactor ci support
tuncer authored
2
3 REBAR=$(PWD)/rebar
4 RETEST=$(PWD)/deps/retest/retest
33b8769 @varnerac-ubnt Add typer target
varnerac-ubnt authored
5 OTPVSNCMD='io:fwrite("~s",[rebar_utils:otp_release()]), halt().'
c074240 @ferd Normalize whitespace
ferd authored
6 OTPVSN=$(shell erl -pa ebin/ -noshell -eval $(OTPVSNCMD))
33b8769 @varnerac-ubnt Add typer target
varnerac-ubnt authored
7 PLT_FILENAME=~/.dialyzer_rebar_$(OTPVSN)_plt
f3f8f29 @kejv Improve test targets in Makefile
kejv authored
8 LOG_LEVEL?=debug
eb79622 @kejv Allow running specific retest suites
kejv authored
9 RT_TARGETS?=inttest
af3eab6 @tuncer Enhance make check (Inspired-by: Stavros Aronis)
tuncer authored
10
564b993 @dizzyd Add helper makefile; update bootstrap to always build w/ debug_info
dizzyd authored
11 all:
12 ./bootstrap
d6b79fb @dizzyd Add "clean" target
dizzyd authored
13
14 clean:
8e12652 @tuncer Makefile: fix 'clean' and add 'distclean'
tuncer authored
15 @rm -rf rebar ebin/*.beam inttest/rt.work rt.work .eunit
b690842 @tuncer erlc: clean-up, enhance, and regression fix fd17693
tuncer authored
16 @rm -f .rebarinfo
8e12652 @tuncer Makefile: fix 'clean' and add 'distclean'
tuncer authored
17
18 distclean: clean
5766b77 @tuncer Delete dialyzer_warnings on 'make distclean'
tuncer authored
19 @rm -f dialyzer_warnings
8e12652 @tuncer Makefile: fix 'clean' and add 'distclean'
tuncer authored
20 @rm -rf deps
c2a5d28 @tuncer Add check target to Makefile
tuncer authored
21
22 debug:
af3eab6 @tuncer Enhance make check (Inspired-by: Stavros Aronis)
tuncer authored
23 @./bootstrap debug
24
35ef363 @tuncer Refactor ci support
tuncer authored
25 check: debug xref dialyzer deps test
af3eab6 @tuncer Enhance make check (Inspired-by: Stavros Aronis)
tuncer authored
26
0191806 @xcurry Add support for custom xref queries
xcurry authored
27 xref:
79a5802 @tuncer Fix Makefile to not ignore xref return code
tuncer authored
28 @./rebar xref
af3eab6 @tuncer Enhance make check (Inspired-by: Stavros Aronis)
tuncer authored
29
33b8769 @varnerac-ubnt Add typer target
varnerac-ubnt authored
30 build_plt:
31 -dialyzer --build_plt --output_plt $(PLT_FILENAME) --apps \
32 erts \
33 kernel \
34 stdlib \
35 crypto \
36 compiler \
37 asn1 \
38 eunit \
39 tools \
40 ssl \
41 edoc \
42 reltool \
43 snmp \
44 sasl
b813542 @tuncer Fix 'make build_plt'
tuncer authored
45 -dialyzer --add_to_plt --plt $(PLT_FILENAME) \
46 --output_plt $(PLT_FILENAME) \
47 --apps diameter
33b8769 @varnerac-ubnt Add typer target
varnerac-ubnt authored
48
af3eab6 @tuncer Enhance make check (Inspired-by: Stavros Aronis)
tuncer authored
49 dialyzer: dialyzer_warnings
50 @diff -U0 dialyzer_reference dialyzer_warnings
c2a5d28 @tuncer Add check target to Makefile
tuncer authored
51
af3eab6 @tuncer Enhance make check (Inspired-by: Stavros Aronis)
tuncer authored
52 dialyzer_warnings:
33b8769 @varnerac-ubnt Add typer target
varnerac-ubnt authored
53 -@dialyzer --plt $(PLT_FILENAME) -q -nn -n ebin \
54 -Wunmatched_returns \
55 -Werror_handling \
56 -Wrace_conditions \
57 > dialyzer_warnings
58
59 typer:
60 typer -r --plt $(PLT_FILENAME) ./src -I ./include
1c98f6c @dizzyd Add binary target for pushing new build of rebar into rebar.wiki
dizzyd authored
61
62 binary: VSN = $(shell ./rebar -V)
63 binary: clean all
691a596 @tuncer Add xref to travis run and clean up Makefile
tuncer authored
64 @cp rebar ../rebar.wiki/rebar
35ef363 @tuncer Refactor ci support
tuncer authored
65 (cd ../rebar.wiki && git commit -m "Update $(VSN)" rebar)
66
67 deps:
691a596 @tuncer Add xref to travis run and clean up Makefile
tuncer authored
68 @REBAR_EXTRA_DEPS=1 ./rebar get-deps
f3f8f29 @kejv Improve test targets in Makefile
kejv authored
69 $(MAKE) -C deps/retest
35ef363 @tuncer Refactor ci support
tuncer authored
70
f3f8f29 @kejv Improve test targets in Makefile
kejv authored
71 test: test_eunit test_inttest
72
73 test_eunit: all
691a596 @tuncer Add xref to travis run and clean up Makefile
tuncer authored
74 @$(REBAR) eunit
f3f8f29 @kejv Improve test targets in Makefile
kejv authored
75
76 test_inttest: all deps
eb79622 @kejv Allow running specific retest suites
kejv authored
77 @$(RETEST) -l $(LOG_LEVEL) $(RT_TARGETS)
720d71e @dizzyd Add travis target to make it easier to reproduce failures locally
dizzyd authored
78
79 travis: clean debug xref clean all deps test
Something went wrong with that request. Please try again.