-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
52 lines (37 loc) · 1.02 KB
/
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
50
51
52
REPO ?= hashids
ERLANG_BIN = $(shell dirname $(shell which erl))
DEPS_PLT = $(REPO)_plt
DEF_PLT_APPS = sasl erts kernel stdlib eunit
PLT_APPS = $(DEF_PLT_APPS)
REBAR = ./rebar3
$(if $(ERLANG_BIN),,$(warning "Warning: No Erlang found in your path, this will probably not work"))
.PHONY: all clean distclean test coverage typer build_plt analysis edoc publish
all: compile
compile:
@$(REBAR) compile
clean:
@$(REBAR) clean
distclean: clean
@rm -rf ./_plt
@rm -rf ./_build
@rm -f ./TEST-*.xml
test:
ifeq ($(suite),)
@$(REBAR) do eunit, cover --verbose
else
@$(REBAR) do eunit --suite $(suite), cover --verbose
endif
coverage:
@open ./_build/test/cover/index.html
typer:
@typer --plt $(DEPS_PLT) -r ./src
build_plt:
@dialyzer --build_plt --output_plt $(DEPS_PLT) --apps $(PLT_APPS)
analysis:
@dialyzer --src ./src --plts $(DEPS_PLT) -Wunmatched_returns -Werror_handling -Wrace_conditions -Wno_behaviours -Wunderspecs
edoc:
rm -rf ./doc
@$(REBAR) edoc
publish:
@rm -f ./src/.DS_Store
./rebar3 hex publish