Permalink
Browse files

Merge pull request #76 from synlay/feature/tweak_makefile_for_ge_otp_…

…17.0

Add 'PRE17' makefile variable for proper compilation with OTP >= 17.0
  • Loading branch information...
2 parents 770f828 + 3995d56 commit bf12ecb30253c84a2331f4f0d93fd68856fcb9f4 @knutin knutin committed Sep 10, 2015
Showing with 8 additions and 0 deletions.
  1. +2 −0 .travis.yml
  2. +6 −0 Makefile
View
2 .travis.yml
@@ -2,6 +2,8 @@ language: erlang
notifications:
email: false
otp_release:
+ - 18.0
+ - 17.5
- 17.4
- 17.3
- 17.1
View
6 Makefile
@@ -1,5 +1,7 @@
APP=eredis
+PRE17 := $(shell ERL_FLAGS="" erl -eval 'io:format("~s~n", [case re:run(erlang:system_info(otp_release), "^R") of nomatch -> ""; _ -> pre17 end]), halt().' -noshell)
+
.PHONY: all compile clean Emakefile
all: compile
@@ -22,6 +24,10 @@ ifdef TEST
EXTRA_OPTS:=$(EXTRA_OPTS) {d,'TEST', true},
endif
+ifndef PRE17
+EXTRA_OPTS:=$(EXTRA_OPTS) {d,namespaced_types},
+endif
+
Emakefile: Emakefile.src
sed "s/{{EXTRA_OPTS}}/$(EXTRA_OPTS)/" $< > $@

0 comments on commit bf12ecb

Please sign in to comment.