From 8ceee72146f2a6eff70a16e3e9a74d2ed072fa0a Mon Sep 17 00:00:00 2001 From: Aggelos Giantsios Date: Tue, 24 Apr 2018 19:33:28 +0300 Subject: [PATCH] Require plt for dialyzer target --- .gitignore | 1 + Makefile | 14 +++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index e43fc65..cc580fa 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *.bak _build +.plt diff --git a/Makefile b/Makefile index 6ff1f28..311b0dc 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: clean all distclean +.PHONY: all clean demo dialyzer edoc distclean TOP = $(PWD) SRC = $(PWD)/src @@ -9,6 +9,8 @@ DOC = doc ERLC = erlc WARNS = +warn_exported_vars +warn_unused_import +warn_missing_spec +DIALYZER_APPS = erts kernel stdlib compiler crypto syntax_tools +DIALYZER_FLAGS = -Wunmatched_returns ERLC_FLAGS = +native +debug_info $(WARNS) ERLC_MACROS = -DDEMO_DATA=\"$(DEMO_DATA)\" @@ -70,12 +72,14 @@ edoc: $(TARGETS) demo: $(TARGETS) @(./rundemo.rb) -dialyzer: $(TARGETS) - dialyzer -n -Wunmatched_returns $(EBIN)/*.beam +dialyzer: .plt $(TARGETS) + dialyzer -n -nn --plt $< $(DIALYZER_FLAGS) $(EBIN)/*.beam + +.plt: + dialyzer --build_plt --output_plt $@ --apps $(DIALYZER_APPS) clean: $(RM) $(EBIN)/*.beam distclean: clean - $(RM) $(DOC)/*.html $(DOC)/*.css $(DOC)/*.png $(DOC)/edoc-info - + $(RM) $(DOC)/*.html $(DOC)/*.css $(DOC)/*.png $(DOC)/edoc-info .plt