diff options
Diffstat (limited to 'make/app_targets.mk')
-rw-r--r-- | make/app_targets.mk | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/make/app_targets.mk b/make/app_targets.mk index 3f28a529d4..e9aaa4193c 100644 --- a/make/app_targets.mk +++ b/make/app_targets.mk @@ -18,8 +18,49 @@ # %CopyrightEnd% # +APPLICATION ?= $(basename $(notdir $(PWD))) -.PHONY: test +.PHONY: test info gclean dialyzer dialyzer_plt dclean test: $(ERL_TOP)/make/test_target_script.sh $(ERL_TOP) + +info: + @echo "$(APPLICATION)_VSN: $(VSN)" + @echo "APP_VSN: $(APP_VSN)" + @echo "" + @echo "DIA_PLT: $(DIA_PLT)" + @echo "DIA_ANALYSIS: $(DIA_ANALYSIS)" + @echo "" + +gclean: + git clean -fXd + + +DIA_DEFAULT_PLT_APPS = erts kernel stdlib $(APPLICATION) +DIA_PLT_DIR = ./priv/plt +DIA_PLT = $(DIA_PLT_DIR)/$(APPLICATION).plt +DIA_ANALYSIS = $(basename $(DIA_PLT)).dialyzer_analysis + +dialyzer_plt: $(DIA_PLT) + +$(DIA_PLT_DIR): + @mkdir -p $@ + +$(DIA_PLT): $(DIA_PLT_DIR) + @echo "Building $(APPLICATION) plt file" + @$(ERL_TOP)/bin/dialyzer --build_plt \ + --output_plt $@ \ + --apps $(sort $(DIA_PLT_APPS) $(DIA_DEFAULT_PLT_APPS)) \ + --output $(DIA_ANALYSIS) \ + --verbose + +dialyzer: $(DIA_PLT) + @echo "Running dialyzer on $(APPLICATION)" + @dialyzer --plt $< \ + ../$(APPLICATION)/ebin \ + --verbose + +dclean: + rm -f $(DIA_PLT) + rm -f $(DIA_ANALYSIS) |