blob: 3171909897a2c10e32913a2e1d62659e2087466f [file] [log] [blame]
APP=local
DIALYZER_OPTS=-Werror_handling -Wrace_conditions -Wunmatched_returns
all: compile xref eunit dialyze
init:
@eval "if ! [ -f 'src/${APP}.app.src' ]; then ./rebar create-app appid=${APP}; fi"
@./rebar prepare-deps
compile:
@./rebar -r compile skip_deps=true
refresh:
@./rebar refresh-deps
@rm -f .dialyzer.plt
xref:
@./rebar -r xref skip_deps=true
clean:
@./rebar -r clean skip_deps=true
@rm -f .dialyzer.plt
distclean:
@git clean -d -f -x
eunit:
@./rebar -r eunit skip_deps=true
edoc:
@./rebar -r doc skip_deps=true
start: compile
@erl -pz ebin -eval 'erlang:display({start_app, $(APP), application:ensure_all_started($(APP))}).'
.dialyzer.plt:
touch .dialyzer.plt
dialyzer --build_plt --plt .dialyzer.plt --apps erts \
$(shell erl -noshell -pa ebin -eval '{ok, _} = application:ensure_all_started($(APP)), lists:foreach(fun erlang:display/1, [Name || {Name, _, _} <- application:which_applications(), Name =/= $(APP)]), halt().')
dialyze: compile .dialyzer.plt
dialyzer --plt .dialyzer.plt -r ebin $(DIALYZER_OPTS)