Просмотр исходного кода

Merge branch 'dialyzer-plt-variable' of git://github.com/danielwhite/erlang.mk

Loïc Hoguin 11 лет назад
Родитель
Сommit
abbb192e0a
2 измененных файлов с 7 добавлено и 3 удалено
  1. 2 0
      README.md
  2. 5 3
      erlang.mk

+ 2 - 0
README.md

@@ -191,6 +191,8 @@ then you only need to put `ponies` in the list.
 `stdlib` in there because they will always be included. The applications
 the project depends on will also be included.
 
+`DIALYZER_PLT` allows you to change the PLT file used by dialyzer.
+
 `DIALYZER_OPTS` allows you to change the `dialyzer` options.
 
 `PKG_FILE` allows you to change the location of the package index file

+ 5 - 3
erlang.mk

@@ -251,16 +251,18 @@ tests: clean deps app build-tests
 
 # Dialyzer.
 
+DIALYZER_PLT ?= $(CURDIR)/.$(PROJECT).plt
+export DIALYZER_PLT
+
 PLT_APPS ?=
 DIALYZER_OPTS ?= -Werror_handling -Wrace_conditions \
 	-Wunmatched_returns # -Wunderspecs
 
 build-plt: deps app
-	@dialyzer --build_plt --output_plt .$(PROJECT).plt \
-		--apps erts kernel stdlib $(PLT_APPS) $(ALL_DEPS_DIRS)
+	@dialyzer --build_plt --apps erts kernel stdlib $(PLT_APPS) $(ALL_DEPS_DIRS)
 
 dialyze:
-	@dialyzer --src src --plt .$(PROJECT).plt --no_native $(DIALYZER_OPTS)
+	@dialyzer --src src --no_native $(DIALYZER_OPTS)
 
 # Packages.