Browse Source

let travis make check to run the dialyzer too.

Makefile tweaks so dialyze can be run after `make clean`.
Andreas Stenius 10 years ago
parent
commit
a4ac28680d
2 changed files with 8 additions and 5 deletions
  1. 2 3
      .travis.yml
  2. 6 2
      Makefile

+ 2 - 3
.travis.yml

@@ -19,9 +19,8 @@ otp_release:
 # since Travis is naughty and calls rebar get-deps behind our backs,
 # since Travis is naughty and calls rebar get-deps behind our backs,
 # we'll have to clean it up and build merl our selves..
 # we'll have to clean it up and build merl our selves..
 script: 
 script: 
-  - "make -C deps/merl && make tests"
+  - "make -C deps/merl && make check"
-  - make plt
+
-  - make dialyze
 notifications:
 notifications:
   irc: "chat.freenode.net#erlydtl"
   irc: "chat.freenode.net#erlydtl"
   email: false
   email: false

+ 6 - 2
Makefile

@@ -29,13 +29,14 @@ PLT_APPS ?= kernel stdlib compiler erts eunit syntax_tools
 DIALYZER_OPTS ?= -Werror_handling -Wrace_conditions -Wunmatched_returns \
 DIALYZER_OPTS ?= -Werror_handling -Wrace_conditions -Wunmatched_returns \
 		-Wunderspecs --verbose --fullpath
 		-Wunderspecs --verbose --fullpath
 .PHONY: dialyze
 .PHONY: dialyze
-dialyze:
+dialyze: compile
+	@[ -f $(PLT_FILE) ] || $(MAKE) plt
 	@dialyzer --plt $(PLT_FILE) $(DIALYZER_OPTS) ebin || [ $$? -eq 2 ];
 	@dialyzer --plt $(PLT_FILE) $(DIALYZER_OPTS) ebin || [ $$? -eq 2 ];
 
 
 ## In case you are missing a plt file for dialyzer,
 ## In case you are missing a plt file for dialyzer,
 ## you can run/adapt this command
 ## you can run/adapt this command
 .PHONY: plt
 .PHONY: plt
-plt:
+plt: compile
 # we need to remove second copy of file
 # we need to remove second copy of file
 	rm -f deps/merl/priv/merl_transform.beam
 	rm -f deps/merl/priv/merl_transform.beam
 	@echo "Building PLT, may take a few minutes"
 	@echo "Building PLT, may take a few minutes"
@@ -47,6 +48,9 @@ clean:
 	@$(REBAR) -C rebar-slex.config clean
 	@$(REBAR) -C rebar-slex.config clean
 	rm -fv erl_crash.dump
 	rm -fv erl_crash.dump
 
 
+really-clean: clean
+	rm -f $(PLT_FILE)
+
 # rebuild any .slex files as well..  not included by default to avoid
 # rebuild any .slex files as well..  not included by default to avoid
 # the slex dependency, which is only needed in case the .slex file has
 # the slex dependency, which is only needed in case the .slex file has
 # been modified locally.
 # been modified locally.