forked from mmzeeman/diffy
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (33 loc) · 862 Bytes
/
Makefile
File metadata and controls
47 lines (33 loc) · 862 Bytes
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
PROJECT = diffy
ERL ?= erl
ERLC ?= $(ERL)c
REBAR := ./rebar3
REBAR_URL := https://s3.amazonaws.com/rebar3/rebar3
DIALYZER = dialyzer
all: compile
$(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)
compile: $(REBAR)
$(REBAR) compile
test: eunit
eunit: $(REBAR)
$(REBAR) as test eunit
xref: $(REBAR)
$(REBAR) as test xref
dialyzer: $(REBAR)
$(REBAR) as test dialyzer
clean: $(REBAR)
$(REBAR) clean
distclean:
rm -rf _build
rm $(REBAR)
# dializer
build-plt:
@$(DIALYZER) --build_plt --output_plt .$(PROJECT).plt \
--apps erts kernel stdlib -r deps
dialyze:
@$(DIALYZER) -pa deps/*/ebin --src src --plt .$(PROJECT).plt --no_native \
-Werror_handling -Wrace_conditions -Wunmatched_returns