summaryrefslogtreecommitdiffstats
path: root/core/main.mk
diff options
context:
space:
mode:
authorZhao Wei Liew <zhaoweiliew@gmail.com>2016-08-09 07:24:10 +0800
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-09-09 01:07:49 +0200
commitbd59f58ffc3704b57e5d9985a13e6a4431defbd9 (patch)
treefc5e1c3f48dffcd9204d5e0421c503fac21b352a /core/main.mk
parent48c3ae8f9f43cac6fb9e4fbe8c998c71a179fe06 (diff)
downloadbuild-bd59f58ffc3704b57e5d9985a13e6a4431defbd9.zip
build-bd59f58ffc3704b57e5d9985a13e6a4431defbd9.tar.gz
build-bd59f58ffc3704b57e5d9985a13e6a4431defbd9.tar.bz2
build: Allow all possible JDK editions by default
JDK 7 or JDK 8? Oracle JDK or OpenJDK? Who cares? CM builds and works just fine with any one of them! Drop EXPERIMENTAL_USE_JAVA8 and OpenJDK checks to allow all of them. Change-Id: I64d7887c2fab4dd301b07d7df0d19f28e97d80ab
Diffstat (limited to 'core/main.mk')
-rw-r--r--core/main.mk51
1 files changed, 5 insertions, 46 deletions
diff --git a/core/main.mk b/core/main.mk
index dd87d0a..e6794a0 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -152,19 +152,11 @@ 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, 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
+# Check for the correct version of java, should be 1.7 or 1.8
+required_version := "1.7.x or 1.8.x"
+required_javac_version := "1.7 or 1.8"
+java_version := $(shell echo '$(java_version_str)' | grep '[ "]1\.[78][\. "$$]')
+javac_version := $(shell echo '$(javac_version_str)' | grep '[ "]1\.[78][\. "$$]')
ifeq ($(strip $(java_version)),)
$(info ************************************************************)
@@ -180,39 +172,6 @@ $(info ************************************************************)
$(error stop)
endif
-# Check for the current JDK.
-#
-# For Java 1.7, we require OpenJDK on linux and Oracle JDK on Mac OS.
-requires_openjdk := false
-ifeq ($(HOST_OS), linux)
-requires_openjdk := true
-endif
-
-
-# Check for the current jdk
-ifeq ($(requires_openjdk), true)
-# The user asked for java7 openjdk, so check that the host
-# java version is really openjdk
-ifeq ($(shell echo '$(java_version_str)' | grep -i openjdk),)
-$(info ************************************************************)
-$(info You asked for an OpenJDK 7 build but your version is)
-$(info $(java_version_str).)
-$(info ************************************************************)
-$(error stop)
-endif # java version is not OpenJdk
-else # if requires_openjdk
-ifneq ($(shell echo '$(java_version_str)' | grep -i openjdk),)
-$(info ************************************************************)
-$(info You are attempting to build with an unsupported JDK.)
-$(info $(space))
-$(info You use OpenJDK but only Sun/Oracle JDK is supported.)
-$(info Please follow the machine setup instructions at)
-$(info $(space)$(space)$(space)$(space)https://source.android.com/source/download.html)
-$(info ************************************************************)
-$(error stop)
-endif # java version is not Sun Oracle JDK
-endif # if requires_openjdk
-
# Check for the correct version of javac
ifeq ($(strip $(javac_version)),)
$(info ************************************************************)