forked from g-andrade/locus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (33 loc) · 832 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
REBAR3_URL=https://s3.amazonaws.com/rebar3/rebar3
ifeq ($(wildcard rebar3),rebar3)
REBAR3 = $(CURDIR)/rebar3
endif
REBAR3 ?= $(shell test -e `which rebar3` 2>/dev/null && which rebar3 || echo "./rebar3")
ifeq ($(REBAR3),)
REBAR3 = $(CURDIR)/rebar3
endif
.PHONY: all build clean check dialyzer xref test cover console doc publish
all: build
build: $(REBAR3)
@$(REBAR3) compile
$(REBAR3):
wget $(REBAR3_URL) || curl -Lo rebar3 $(REBAR3_URL)
@chmod a+x rebar3
clean:
@$(REBAR3) clean
check: dialyzer xref
dialyzer:
@$(REBAR3) dialyzer
xref:
@$(REBAR3) xref
test:
@$(REBAR3) as test ct
cover: test
@$(REBAR3) as test cover
console: export ERL_FLAGS =? +pc unicode
console:
@$(REBAR3) as development shell --apps locus
doc: build
./scripts/hackish_make_docs.sh
publish:
@$(REBAR3) as publication hex publish