diff options
author | Neil Fuller <nfuller@google.com> | 2014-10-16 10:23:03 +0100 |
---|---|---|
committer | Neil Fuller <nfuller@google.com> | 2014-10-23 14:07:29 +0100 |
commit | 960f22c11dc282ef872080f8c1ad50bdff4a99ad (patch) | |
tree | afc7f3dc4b881a8e7ee6b1859e0520b91ef59a85 /core/main.mk | |
parent | 4dfda1fa4201e41022396b77054168ffc73b590c (diff) | |
download | build-960f22c11dc282ef872080f8c1ad50bdff4a99ad.zip build-960f22c11dc282ef872080f8c1ad50bdff4a99ad.tar.gz build-960f22c11dc282ef872080f8c1ad50bdff4a99ad.tar.bz2 |
Add OpenJDK 8 experimental support
Targeting 1.7: just adding support for the tools.
Various issues exist with OpenJDK 8: it doesn't build to completion
yet.
Change-Id: I54942f497264234e4bef488c8d17d243b4ef2f14
Diffstat (limited to 'core/main.mk')
-rw-r--r-- | core/main.mk | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/main.mk b/core/main.mk index b628c8f..7791c3e 100644 --- a/core/main.mk +++ b/core/main.mk @@ -139,11 +139,19 @@ endif java_version_str := $(shell unset _JAVA_OPTIONS && java -version 2>&1) javac_version_str := $(shell unset _JAVA_OPTIONS && javac -version 2>&1) -# Check for the correct version of java. +# Check for the correct version of java, should be 1.7 by +# default, and 1.8 if EXPERIMENTAL_USE_JAVA8 is set +ifneq ($(EXPERIMENTAL_USE_JAVA8),) +required_version := "1.8.x" +required_javac_version := "1.8" +java_version := $(shell echo '$(java_version_str)' | grep 'openjdk .*[ "]1\.8[\. "$$]') +javac_version := $(shell echo '$(javac_version_str)' | grep '[ "]1\.8[\. "$$]') +else # default required_version := "1.7.x" required_javac_version := "1.7" java_version := $(shell echo '$(java_version_str)' | grep '^java .*[ "]1\.7[\. "$$]') javac_version := $(shell echo '$(javac_version_str)' | grep '[ "]1\.7[\. "$$]') +endif # if EXPERIMENTAL_USE_JAVA8 ifeq ($(strip $(java_version)),) $(info ************************************************************) |