-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
80 lines (61 loc) · 1.24 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
80
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -euc
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
export ERL_FLAGS = -enable-feature maybe_expr # needed for katana-code under OTP 25
## General Rules
all: compile
.PHONY: all
.NOTPARALLEL: all
compile:
@rebar3 compile
.PHONY: compile
clean:
@rebar3 clean -a
.PHONY: clean
check: xref hank-dead-code-cleaner elvis-linter dialyzer
.NOTPARALLEL: check
.PHONY: check
test: eunit ct
.NOTPARALLEL: test
.PHONY: test
## Tests
ct:
@rebar3 do ct, cover
.PHONY: ct
eunit:
@rebar3 eunit
.PHONY: eunit
## Checks
xref:
@rebar3 as test xref
.PHONY: xref
hank-dead-code-cleaner:
@if rebar3 plugins list | grep '^rebar3_hank\>' >/dev/null; then \
rebar3 hank; \
else \
echo >&2 "WARN: skipping rebar3_hank check"; \
fi
.PHONY: hank-dead-code-cleaner
elvis-linter:
@if rebar3 plugins list | grep '^rebar3_lint\>' >/dev/null; then \
rebar3 lint; \
else \
echo >&2 "WARN: skipping rebar3_lint check"; \
fi
.PHONY: elvis-linter
dialyzer:
@rebar3 as test dialyzer
.PHONY: dialyzer
## Shell, docs and publication
shell: export ERL_FLAGS = +pc unicode
shell:
@rebar3 as test shell
doc-dry:
@rebar3 hex build
.PHONY: doc-dry
publish:
publish: doc
@rebar3 hex publish