forked from epgsql/pooler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (25 loc) · 873 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
.PHONY: all compile run test doc clean
REBAR=$(shell which rebar3 || echo ./rebar3)
all: compile
compile: $(REBAR)
$(REBAR) as dev compile
run: $(REBAR)
@$(REBAR) as dev shell --apps pooler --config config/demo.config
test: $(REBAR)
$(REBAR) eunit --cover skip_deps=true verbose=3
$(REBAR) cover
doc: $(REBAR)
$(REBAR) as dev edoc
clean: $(REBAR)
$(REBAR) as dev clean
$(REBAR) as test clean
@rm -rf ./erl_crash.dump
dialyzer: $(REBAR)
$(REBAR) as dev dialyzer
# Get rebar3 if it doesn't exist. If rebar3 was found on PATH, the
# $(REBAR) dep will be satisfied since the file will exist.
REBAR_URL = https://s3.amazonaws.com/rebar3/rebar3
./rebar3:
@echo "Fetching rebar3 from $(REBAR_URL)"
@erl -noinput -noshell -s inets -s ssl -eval '{ok, _} = httpc:request(get, {"${REBAR_URL}", []}, [], [{stream, "${REBAR}"}])' -s init stop
chmod +x ${REBAR}