-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
75 lines (53 loc) · 1.45 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
REBAR3_URL=https://s3.amazonaws.com/rebar3/rebar3
ifeq ($(wildcard rebar3),rebar3)
REBAR3 = $(CURDIR)/rebar3
endif
ifdef RUNNING_ON_CI
REBAR3 = ./rebar3
else
REBAR3 ?= $(shell test -e `which rebar3` 2>/dev/null && which rebar3 || echo "./rebar3")
endif
ifeq ($(REBAR3),)
REBAR3 = $(CURDIR)/rebar3
endif
.PHONY: all build clean check dialyzer xref
.PHONY: test test_ct test_release ci_test cover
.PHONY: console microbenchmark doc publish
.NOTPARALLEL: check test
all: build
build: $(REBAR3)
@$(REBAR3) compile
$(REBAR3):
wget $(REBAR3_URL) || curl -Lo rebar3 $(REBAR3_URL)
@chmod a+x rebar3
clean: $(REBAR3)
@$(REBAR3) clean
check: dialyzer xref
dialyzer: $(REBAR3)
@$(REBAR3) dialyzer
xref: $(REBAR3)
@$(REBAR3) xref
test: test_ct test_release
test_ct: $(REBAR3)
@$(REBAR3) as test ct
test_release: $(REBAR3)
./test_release.sh $(REBAR3)
ci_test: test check
cover: test
@$(REBAR3) as test cover
console: $(REBAR3)
@$(REBAR3) as development shell --apps aequitas
microbenchmark: $(REBAR3)
@$(REBAR3) as development shell --script microbenchmark.escript
doc: $(REBAR3)
@$(REBAR3) edoc
README.md: doc
# non-portable dirty hack follows (pandoc 2.1.1 used)
# gfm: "github-flavoured markdown"
@pandoc --from html --to gfm doc/overview-summary.html -o README.md
@tail -n +11 <"README.md" >"README.md_"
@head -n -12 <"README.md_" >"README.md"
@tail -n 2 <"README.md_" >>"README.md"
@rm "README.md_"
publish: $(REBAR3)
@$(REBAR3) hex publish