2015-03-31 07:46:03 +00:00
|
|
|
REBAR_BIN := $(shell which rebar)
|
|
|
|
ifeq ($(REBAR_BIN),)
|
|
|
|
REBAR_BIN = ./rebar
|
|
|
|
endif
|
|
|
|
|
2015-04-08 05:24:07 +00:00
|
|
|
.PHONY: rel deps package pkgclean edoc
|
2015-03-31 07:46:03 +00:00
|
|
|
|
|
|
|
all: deps compile
|
|
|
|
|
|
|
|
compile:
|
|
|
|
$(REBAR_BIN) compile
|
|
|
|
|
|
|
|
deps:
|
|
|
|
$(REBAR_BIN) get-deps
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(REBAR_BIN) -r clean
|
|
|
|
|
|
|
|
test: deps compile eunit
|
|
|
|
|
|
|
|
eunit:
|
|
|
|
$(REBAR_BIN) -v skip_deps=true eunit
|
|
|
|
|
2015-04-08 05:24:07 +00:00
|
|
|
edoc: edoc-clean
|
|
|
|
$(REBAR_BIN) skip_deps=true doc
|
|
|
|
|
|
|
|
edoc-clean:
|
|
|
|
rm -f edoc/*.png edoc/*.html edoc/*.css edoc/edoc-info
|
|
|
|
|
2015-03-31 07:46:03 +00:00
|
|
|
pulse: compile
|
|
|
|
env USE_PULSE=1 $(REBAR_BIN) skip_deps=true clean compile
|
2015-06-02 13:13:15 +00:00
|
|
|
env USE_PULSE=1 $(REBAR_BIN) skip_deps=true -D PULSE eunit -v
|
2015-03-31 07:46:03 +00:00
|
|
|
|
|
|
|
APPS = kernel stdlib sasl erts ssl compiler eunit crypto
|
|
|
|
PLT = $(HOME)/.machi_dialyzer_plt
|
|
|
|
|
|
|
|
build_plt: deps compile
|
|
|
|
dialyzer --build_plt --output_plt $(PLT) --apps $(APPS) deps/*/ebin
|
|
|
|
|
2015-06-19 06:19:59 +00:00
|
|
|
DIALYZER_DEP_APPS = ebin/machi_pb.beam deps/protobuffs/ebin
|
2015-06-19 07:04:34 +00:00
|
|
|
DIALYZER_FLAGS = -Wno_return -Wrace_conditions -Wunderspecs
|
2015-06-19 06:19:59 +00:00
|
|
|
|
2015-03-31 07:46:03 +00:00
|
|
|
dialyzer: deps compile
|
2015-06-19 07:04:34 +00:00
|
|
|
dialyzer $(DIALYZER_FLAGS) --plt $(PLT) ebin $(DIALYZER_DEP_APPS) | \
|
2015-06-19 06:19:59 +00:00
|
|
|
egrep -v -f ./filter-dialyzer-dep-warnings
|
2015-03-31 07:46:03 +00:00
|
|
|
|
2015-04-02 03:38:12 +00:00
|
|
|
dialyzer-test: deps compile
|
2015-06-02 10:07:13 +00:00
|
|
|
echo Force rebar to recompile .eunit dir w/o running tests > /dev/null
|
|
|
|
rebar skip_deps=true eunit suite=lamport_clock
|
2015-06-19 07:04:34 +00:00
|
|
|
dialyzer $(DIALYZER_FLAGS) --plt $(PLT) .eunit $(DIALYZER_DEP_APPS) | \
|
2015-06-19 06:19:59 +00:00
|
|
|
egrep -v -f ./filter-dialyzer-dep-warnings
|
2015-04-02 03:38:12 +00:00
|
|
|
|
2015-03-31 07:46:03 +00:00
|
|
|
clean_plt:
|
|
|
|
rm $(PLT)
|