OSDN Git Service

build: Allow both OpenJDK and OracleJDK by default
authorZhao Wei Liew <zhaoweiliew@gmail.com>
Mon, 8 Aug 2016 23:24:10 +0000 (07:24 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 4 May 2017 06:31:53 +0000 (14:31 +0800)
Some users would like to build with Oracle JDK on Linux,
while others would like to build with OpenJDK on Darwin.

CM should build fine with either configuration, so drop
the OpenJDK checks to allow both of them.

Change-Id: I64d7887c2fab4dd301b07d7df0d19f28e97d80ab

core/main.mk

index a612f83..f5baeac 100644 (file)
@@ -210,39 +210,6 @@ $(info ************************************************************)
 $(error stop)
 endif
 
-# Check for the current JDK.
-#
-# For Java 1.7/1.8, we require OpenJDK on linux and Oracle JDK on Mac OS.
-requires_openjdk := false
-ifeq ($(BUILD_OS),linux)
-requires_openjdk := true
-endif
-
-
-# Check for the current jdk
-ifeq ($(requires_openjdk), true)
-# The user asked for openjdk, so check that the host
-# java version is really openjdk and not some other JDK.
-ifeq ($(shell echo '$(java_version_str)' | grep -i openjdk),)
-$(info ************************************************************)
-$(info You asked for an OpenJDK based 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
-
 KNOWN_INCOMPATIBLE_JAVAC_VERSIONS := google
 incompat_javac := $(foreach v,$(KNOWN_INCOMPATIBLE_JAVAC_VERSIONS),$(findstring $(v),$(javac_version_str)))
 ifneq ($(incompat_javac),)