-
Notifications
You must be signed in to change notification settings - Fork 69
/
Makefile
46 lines (36 loc) · 894 Bytes
/
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
CACHEGRIND=qcachegrind
REBAR3=$(shell which rebar3)
ifeq ($(REBAR3),)
REBAR3=./bin/rebar3
endif
all: compile
clean:
@echo "Running rebar3 clean..."
@$(REBAR3) clean -a
compile:
@echo "Running rebar3 compile..."
@$(REBAR3) as compile compile
dialyzer:
@echo "Running rebar3 dialyze..."
@$(REBAR3) dialyzer
edoc:
@echo "Running rebar3 edoc..."
@$(REBAR3) as edoc edoc
eunit:
@echo "Running rebar3 eunit..."
@$(REBAR3) do eunit -cv, cover -v
profile:
@echo "Profiling..."
@$(REBAR3) as test compile
@erl -noshell \
-pa _build/test/lib/*/ebin \
-pa _build/test/lib/*/test \
-eval 'statsderl_profile:fprofx()' \
-eval 'init:stop()'
@_build/test/lib/fprofx/erlgrindx -p fprofx.analysis
@$(CACHEGRIND) fprofx.cgrind
test: xref eunit dialyzer
xref:
@echo "Running rebar3 xref..."
@$(REBAR3) xref
.PHONY: clean compile dialyzer edoc eunit profile xref