aboutsummaryrefslogblamecommitdiffstats
path: root/plugins/dialyzer.mk
blob: 87549195eb9347d2140e4ce72ad6936b8ccd9d10 (plain) (tree)

































                                                                                    
# Copyright (c) 2013-2014, Loïc Hoguin <[email protected]>
# This file is part of erlang.mk and subject to the terms of the ISC License.

.PHONY: plt distclean-plt dialyze

# Configuration.

DIALYZER_PLT ?= $(CURDIR)/.$(PROJECT).plt
export DIALYZER_PLT

PLT_APPS ?=
DIALYZER_OPTS ?= -Werror_handling -Wrace_conditions \
	-Wunmatched_returns # -Wunderspecs

# Core targets.

distclean:: distclean-plt

help::
	@printf "%s\n" "" \
		"Dialyzer targets:" \
		"  plt         Build a PLT file for this project" \
		"  dialyze     Analyze the project using Dialyzer"

# Plugin-specific targets.

plt: deps app
	@dialyzer --build_plt --apps erts kernel stdlib $(PLT_APPS) $(ALL_DEPS_DIRS)

distclean-plt:
	$(gen_verbose) rm -f $(DIALYZER_PLT)

dialyze:
	@dialyzer --src src --no_native $(DIALYZER_OPTS)