aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric B Merritt <[email protected]>2013-04-07 21:03:43 -0700
committerTristan Sloughter <[email protected]>2013-04-08 18:10:13 -0500
commit95a54e26db826c8d3a10aea4982dd0de7291f424 (patch)
tree723ffa234402c81d3d45e23522cebbdec365017d
parent88928540483de79e2509d0add5833cb21f243fe4 (diff)
downloadrelx-95a54e26db826c8d3a10aea4982dd0de7291f424.tar.gz
relx-95a54e26db826c8d3a10aea4982dd0de7291f424.tar.bz2
relx-95a54e26db826c8d3a10aea4982dd0de7291f424.zip
Don't run dialyzer on R14 and below
Its too slow and the build fails on travis
-rw-r--r--Makefile25
1 files 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