-
Notifications
You must be signed in to change notification settings - Fork 77
/
Makefile
38 lines (27 loc) · 808 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
PROJECT = esqlite
DIALYZER = dialyzer
ERL ?= erl
REBAR3 := $(shell which rebar3 2>/dev/null || echo ./rebar3)
REBAR3_VERSION := 3.17.0
REBAR3_URL := https://github.com/erlang/rebar3/releases/download/$(REBAR3_VERSION)/rebar3
all: compile
$(REBAR3):
$(ERL) -noshell -s inets -s ssl \
-eval '{ok, saved_to_file} = httpc:request(get, {"$(REBAR3_URL)", []}, [], [{stream, "./rebar3"}])' \
-s init stop
chmod +x ./rebar3
compile: $(REBAR3)
$(REBAR3) compile
test: compile
$(REBAR3) eunit
clean: $(REBAR3)
$(REBAR3) clean
distclean:
rm $(REBAR3)
# dialyzer
build-plt:
@$(DIALYZER) --build_plt --output_plt .$(PROJECT).plt \
--apps kernel stdlib
dialyze:
@$(DIALYZER) --src src --plt .$(PROJECT).plt --no_native \
-Werror_handling -Wrace_conditions -Wunmatched_returns -Wunderspecs