Skip to content

Commit

Permalink
Require plt for dialyzer target
Browse files Browse the repository at this point in the history
  • Loading branch information
aggelgian committed Apr 24, 2018
1 parent 405862e commit 8ceee72
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@
*.bak

_build
.plt
14 changes: 9 additions & 5 deletions Makefile
@@ -1,4 +1,4 @@
.PHONY: clean all distclean
.PHONY: all clean demo dialyzer edoc distclean

TOP = $(PWD)
SRC = $(PWD)/src
Expand All @@ -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)\"

Expand Down Expand Up @@ -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

0 comments on commit 8ceee72

Please sign in to comment.