dialyzer.mk 797 B

12345678910111213141516171819202122232425262728293031323334
  1. # Copyright (c) 2013-2014, Loïc Hoguin <essen@ninenines.eu>
  2. # This file is part of erlang.mk and subject to the terms of the ISC License.
  3. .PHONY: plt distclean-plt dialyze
  4. # Configuration.
  5. DIALYZER_PLT ?= $(CURDIR)/.$(PROJECT).plt
  6. export DIALYZER_PLT
  7. PLT_APPS ?=
  8. DIALYZER_OPTS ?= -Werror_handling -Wrace_conditions \
  9. -Wunmatched_returns # -Wunderspecs
  10. # Core targets.
  11. distclean:: distclean-plt
  12. help::
  13. @printf "%s\n" "" \
  14. "Dialyzer targets:" \
  15. " plt Build a PLT file for this project" \
  16. " dialyze Analyze the project using Dialyzer"
  17. # Plugin-specific targets.
  18. plt: deps app
  19. @dialyzer --build_plt --apps erts kernel stdlib $(PLT_APPS) $(ALL_DEPS_DIRS)
  20. distclean-plt:
  21. $(gen_verbose) rm -f $(DIALYZER_PLT)
  22. dialyze:
  23. @dialyzer --src src --no_native $(DIALYZER_OPTS)