From 95a54e26db826c8d3a10aea4982dd0de7291f424 Mon Sep 17 00:00:00 2001 From: Eric B Merritt Date: Sun, 7 Apr 2013 21:03:43 -0700 Subject: Don't run dialyzer on R14 and below Its too slow and the build fails on travis --- Makefile | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 55565b0..a2eeaf9 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,24 @@ ifeq ($(REBAR),) $(error "Rebar not available on this system") endif +# ============================================================================= +# Handle version discovery +# ============================================================================= + +# We have a problem that we only have 10 minutes to build on travis +# and those travis boxes are quite small. This is ok for the fast +# dialyzer on R15 and above. However on R14 and below we have the +# problem that travis times out. The code below lets us not run +# dialyzer on R14 +OTP_VSN=$(shell erl -noshell -eval 'io:format("~p", [erlang:system_info(otp_release)]), erlang:halt(0).' | perl -lne 'print for /R(\d+).*/g') +TRAVIS_SLOW=$(shell expr $(OTP_VSN) \<= 14 ) + +ifeq ($(TRAVIS_SLOW), 0) +DIALYZER=$(shell which dialyzer) +else +DIALYZER=: not running dialyzer on R14 +endif + .PHONY: all compile doc clean test dialyzer typer shell distclean pdf \ update-deps escript clean-common-test-data rebuild @@ -75,13 +93,14 @@ ct: compile clean-common-test-data test: compile eunit ct $(DEPS_PLT): - @echo Building local plt at $(DEPS_PLT) + @echo Building local erts plt at $(DEPS_PLT) @echo - dialyzer --output_plt $(DEPS_PLT) --build_plt \ + $(DIALYZER) --output_plt $(DEPS_PLT) --build_plt \ --apps erts kernel stdlib -r deps dialyzer: $(DEPS_PLT) - dialyzer --fullpath --plt $(DEPS_PLT) -I include -Wrace_conditions -r ./ebin + $(DIALYZER) --fullpath --plt $(DEPS_PLT) \ + -I include -Wrace_conditions -r ./ebin typer: typer --plt $(DEPS_PLT) -r ./src -- cgit v1.2.3