summaryrefslogtreecommitdiff
path: root/Makefile
blob: 106e289e1f44a9d5d8b6aa5abff0da161ff53142 (plain)
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
.PHONY: clean xref_warnings deps test test_eunit test_inttest

REBAR=$(PWD)/rebar
RETEST=$(PWD)/deps/retest/retest
LOG_LEVEL?=debug
RT_TARGETS?=inttest

all:
	./bootstrap

clean:
	@rm -rf rebar .rebar/erlcinfo ebin/*.beam inttest/rt.work rt.work .eunit

distclean: clean
	@rm -rf deps

debug:
	@./bootstrap debug

check: debug xref dialyzer deps test

xref:
	@./rebar xref

maybe_build_plt:
	@./rebar -vv check-plt || ./rebar -vv build-plt

dialyze: maybe_build_plt
	@./rebar -vv dialyze

binary: VSN = $(shell ./rebar -V)
binary: clean all
	@cp rebar ../rebar.wiki/rebar
	(cd ../rebar.wiki && git commit -m "Update $(VSN)" rebar)

deps:
	@REBAR_EXTRA_DEPS=1 $(REBAR) get-deps
	@(cd deps/retest && $(REBAR) compile escriptize)

test: test_eunit test_inttest

test_eunit: all
	@$(REBAR) eunit

test_inttest: all deps
	@$(RETEST) -l $(LOG_LEVEL) $(RT_TARGETS)

ci: clean debug xref clean all deps test

ci-dialyze: clean debug dialyze