-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
55 lines (37 loc) · 787 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
47
48
49
50
51
52
53
54
55
.PHONY: all compile deps test dialyzer dialyze clean distclean shell docs edoc xref cover
REBAR3_URL=https://s3.amazonaws.com/rebar3/rebar3
ifeq ($(wildcard rebar3),rebar3)
REBAR3 = $(CURDIR)/rebar3
endif
# Fallback to rebar on PATH
REBAR3 ?= $(shell which rebar3)
# And finally, prep to download rebar if all else fails
ifeq ($(REBAR3),)
REBAR3 = rebar3
endif
all: compile
compile: $(REBAR3)
@$(REBAR3) compile
deps: $(REBAR3)
@$(REBAR3) deps
test:
@$(REBAR3) ct --verbose
dialyzer:
@$(REBAR3) dialyzer
dialyze: dialyzer
clean:
@$(REBAR3) clean
distclean:
@rm -rf _build
shell:
@$(REBAR3) shell
docs:
@$(REBAR3) edoc
edoc: docs
xref:
@$(REBAR3) xref
cover:
@$(REBAR3) cover
$(REBAR3):
curl -Lo rebar3 $(REBAR3_URL) || wget $(REBAR3_URL)
chmod a+x rebar3