diff options
Diffstat (limited to 'test/plugin_dialyzer.mk')
-rw-r--r-- | test/plugin_dialyzer.mk | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/test/plugin_dialyzer.mk b/test/plugin_dialyzer.mk index 732f568..e4240d7 100644 --- a/test/plugin_dialyzer.mk +++ b/test/plugin_dialyzer.mk @@ -1,14 +1,27 @@ # Dialyzer plugin. -DIALYZER_TARGETS = $(call list_targets,dialyzer) +dialyzer_TARGETS = $(call list_targets,dialyzer) + +dialyzer_TARGETS_SET_1 = dialyzer-app dialyzer-apps-only dialyzer-apps-with-local-deps +dialyzer_TARGETS_SET_2 = dialyzer-beam dialyzer-check dialyzer-custom-plt dialyzer-deps +dialyzer_TARGETS_SET_3 = dialyzer-erlc-opts dialyzer-local-deps dialyzer-opts dialyzer-plt-apps +dialyzer_TARGETS_SET_4 = dialyzer-plt-ebin-only dialyzer-plt-swallow-warnings dialyzer-pt + +ifneq ($(filter-out $(dialyzer_TARGETS_SET_1) $(dialyzer_TARGETS_SET_2) $(dialyzer_TARGETS_SET_3) $(dialyzer_TARGETS_SET_4),$(dialyzer_TARGETS)),) +$(error Dialyzer target missing from dialyzer_TARGETS_SET_* variables.) +endif + +ifdef SET +dialyzer_TARGETS := $(dialyzer_TARGETS_SET_$(SET)) +endif ifneq ($(shell which sem 2>/dev/null),) DIALYZER_MUTEX = sem --fg --id dialyzer endif -.PHONY: dialyzer $(DIALYZER_TARGETS) +.PHONY: dialyzer $(dialyzer_TARGETS) -dialyzer: $(DIALYZER_TARGETS) +dialyzer: $(dialyzer_TARGETS) dialyzer-app: init @@ -105,7 +118,7 @@ dialyzer-beam: init $t $(MAKE) -C $(APP) -f erlang.mk bootstrap $v $i "Add lager to the list of dependencies" - $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = lager\n"}' $(APP)/Makefile + $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = lager\ndep_lager = git https://github.com/erlang-lager/lager master\n"}' $(APP)/Makefile $i "Add lager_transform to ERLC_OPTS" $t echo "ERLC_OPTS += +'{parse_transform, lager_transform}'" >> $(APP)/Makefile @@ -285,6 +298,10 @@ dialyzer-plt-ebin-only: init $i "Build the application" $t $(MAKE) -C $(APP) $v +# @todo Temporary measure to make CACHE_DEPS=1 tests work again. + $i "Patch Cowlib's Erlang.mk" + $t cp ../erlang.mk $(APP)/deps/cowlib/ + $i "Build Cowlib for tests to fetch autopatched dependencies" $t $(MAKE) -C $(APP)/deps/cowlib test-build $v @@ -308,7 +325,7 @@ dialyzer-plt-swallow-warnings: init $t $(MAKE) -C $(APP) -f erlang.mk bootstrap $v $i "Add LFE version referring to a missing function to the list of dependencies" - $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = lfe\ndep_lfe_commit = d656987dc5f5e08306531ad1ce13bf9ca9ec9e5a\n"}' $(APP)/Makefile + $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = lfe\ndep_lfe = git https://github.com/rvirding/lfe d656987dc5f5e08306531ad1ce13bf9ca9ec9e5a\n"}' $(APP)/Makefile $i "Create the PLT file" $t $(DIALYZER_MUTEX) $(MAKE) -C $(APP) plt $v |