-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
36 lines (26 loc) · 812 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
PROJECT = diffy
REBAR := $(shell which rebar 2>/dev/null || echo ./rebar)
REBAR_URL := https://github.com/downloads/basho/rebar/rebar
DIALYZER = dialyzer
all: compile
./rebar:
erl -noshell -s inets start -s ssl start \
-eval '{ok, saved_to_file} = httpc:request(get, {"$(REBAR_URL)", []}, [], [{stream, "./rebar"}])' \
-s inets stop -s init stop
chmod +x ./rebar
compile: rebar
$(REBAR) compile
eunit: rebar
$(REBAR) get-dep compile
$(REBAR) eunit -v skip_deps=true
clean: rebar
$(REBAR) clean
distclean:
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