-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
47 lines (35 loc) · 842 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
ERL ?= erl
ERLC ?= $(ERL)c
REBAR := ./rebar3
REBAR_URL := https://s3.amazonaws.com/rebar3/rebar3
.PHONY: compile test dialyzer xref clean
all: compile
compile: $(REBAR)
$(REBAR) compile
test: $(REBAR)
$(REBAR) as test eunit
$(REBAR) as test proper
dialyzer: $(REBAR)
$(REBAR) as check dialyzer
xref: $(REBAR)
$(REBAR) as test xref
clean: $(REBAR) clean_doc
$(REBAR) clean
clean_doc:
@rm -f doc/*.html
@rm -f doc/erlang.png
@rm -f doc/edoc-info
##
## Doc targets
##
edoc: $(REBAR)
$(REBAR) edoc
edoc_private: $(REBAR)
$(REBAR) as edoc_private edoc
exdoc: $(REBAR)
$(REBAR) ex_doc --logo doc/img/logo.png --output edoc
$(REBAR):
$(ERL) -noshell -s inets -s ssl \
-eval '{ok, saved_to_file} = httpc:request(get, {"$(REBAR_URL)", []}, [], [{stream, "$(REBAR)"}])' \
-s init stop
chmod +x $(REBAR)