forked from IgorKarymov/mini_s3
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
49 lines (34 loc) · 877 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
48
49
REBAR=$(shell which rebar)
ifeq ($(REBAR),)
$(error "Rebar not available on this system")
endif
APPDIR=$(CURDIR)
SRCDIR=$(APPDIR)/src
EBINDIR=$(APPDIR)/ebin
PLT_DIR=$(CURDIR)/.plt
DEPS_PLT=$(PLT_DIR)/mini_s3
DIALYZER_DEPS=ibrowse
ERLPATH=-pa $(EBINDIR) -pa $(APPDIR)/deps/*/ebin
.PHONY=all clean_plt dialyzer typer compile clean distclean test
all: compile test dialyzer
deps:
$(REBAR) get-deps
$(PLT_DIR):
mkdir -p $(PLT_DIR)
$(DEPS_PLT): $(PLT_DIR)
dialyzer --build_plt --output_plt $(DEPS_PLT) \
$(ERLPATH) --apps $(DIALYZER_DEPS)
clean_plt:
rm -rf $(PLT_DIR)
dialyzer: $(DEPS_PLT)
@dialyzer -Wrace_conditions -Wunderspecs \
--plts ~/.dialyzer_plt $(DEPS_PLT) -r $(EBINDIR)
typer: compile $(PLT)
typer --plt $(PLT) -r $(SRCDIR)
compile:
$(REBAR) compile
test:
$(REBAR) skip_deps=true eunit
clean:
$(REBAR) clean
distclean: clean clean_plt