aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--erlang.mk8
-rw-r--r--plugins/dialyzer.mk8
2 files changed, 14 insertions, 2 deletions
diff --git a/erlang.mk b/erlang.mk
index 9c25c9b..082454b 100644
--- a/erlang.mk
+++ b/erlang.mk
@@ -618,13 +618,19 @@ help::
# Plugin-specific targets.
-plt: deps app
+$(DIALYZER_PLT): deps app
@dialyzer --build_plt --apps erts kernel stdlib $(PLT_APPS) $(ALL_DEPS_DIRS)
+plt: $(DIALYZER_PLT)
+
distclean-plt:
$(gen_verbose) rm -f $(DIALYZER_PLT)
+ifneq ($(wildcard $(DIALYZER_PLT)),)
dialyze:
+else
+dialyze: $(DIALYZER_PLT)
+endif
@dialyzer --no_native --src -r src $(DIALYZER_OPTS)
# Copyright (c) 2013-2014, Loïc Hoguin <[email protected]>
diff --git a/plugins/dialyzer.mk b/plugins/dialyzer.mk
index 8e404d1..db1143a 100644
--- a/plugins/dialyzer.mk
+++ b/plugins/dialyzer.mk
@@ -24,11 +24,17 @@ help::
# Plugin-specific targets.
-plt: deps app
+$(DIALYZER_PLT): deps app
@dialyzer --build_plt --apps erts kernel stdlib $(PLT_APPS) $(ALL_DEPS_DIRS)
+plt: $(DIALYZER_PLT)
+
distclean-plt:
$(gen_verbose) rm -f $(DIALYZER_PLT)
+ifneq ($(wildcard $(DIALYZER_PLT)),)
dialyze:
+else
+dialyze: $(DIALYZER_PLT)
+endif
@dialyzer --no_native --src -r src $(DIALYZER_OPTS)