Improve the "dialyzer" target

This commit is contained in:
Evgeniy Khramtsov 2013-06-24 03:37:18 +10:00
parent eb74efb5e6
commit e68473fea8
1 changed files with 25 additions and 10 deletions

View File

@ -239,17 +239,32 @@ TAGS:
Makefile: Makefile.in
erlang.plt:
-dialyzer --build_plt --output_plt erlang.plt \
--apps kernel stdlib sasl crypto public_key ssl mnesia \
inets odbc tools compiler erts webtool runtime_tools asn1 \
observer xmerl et gs wx syntax_tools deps/*/ebin
deps := $(wildcard deps/*/ebin)
plt: erlang.plt
dialyzer/erlang.plt:
@mkdir -p dialyzer
@dialyzer --build_plt --output_plt dialyzer/erlang.plt \
-o dialyzer/erlang.log --apps kernel stdlib sasl crypto \
public_key ssl mnesia inets odbc tools compiler erts webtool \
runtime_tools asn1 observer xmerl et gs wx syntax_tools; \
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
dialyzer: plt
-dialyzer --plt erlang.plt --add_to_plt --output_plt ejabberd.plt \
--get_warnings -o dialyzer.log ebin
dialyzer/deps.plt:
@mkdir -p dialyzer
@dialyzer --build_plt --output_plt dialyzer/deps.plt \
-o dialyzer/deps.log $(deps); \
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
dialyzer/ejabberd.plt:
@mkdir -p dialyzer
@dialyzer --build_plt --output_plt dialyzer/ejabberd.plt \
-o dialyzer/ejabberd.log ebin; \
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
dialyzer: dialyzer/erlang.plt dialyzer/deps.plt dialyzer/ejabberd.plt
@dialyzer --plts dialyzer/erlang.plt dialyzer/deps.plt dialyzer/ejabberd.plt \
--get_warnings -o dialyzer/error.log ebin; \
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
test:
@echo "************************** NOTICE ***************************************"
@ -257,5 +272,5 @@ test:
@echo "*************************************************************************"
$(REBAR) skip_deps=true ct
.PHONY: src doc edoc dialyzer Makefile TAGS clean clean-rel distclean rel plt \
.PHONY: src doc edoc dialyzer Makefile TAGS clean clean-rel distclean rel \
install uninstall uninstall-binary uninstall-all translations deps test spec