resolved conflicts for merge of 6835cbf9 to master

Change-Id: I21593edf5f597bc79ff91b756bdaf6921b05cba7
This commit is contained in:
Narayan Kamath 2013-12-06 17:31:38 +00:00
commit 1d755aaa7b
2 changed files with 22 additions and 11 deletions

View File

@ -8,10 +8,10 @@
# COMMON_JAVAC -- Java compiler command with common arguments
#
ifeq ($(EXPERIMENTAL_USE_JAVA7_OPENJDK),)
ifeq ($(EXPERIMENTAL_USE_JAVA7),)
common_flags := -target 1.5 -Xmaxerrs 9999999
else
common_flags := -Xmaxerrs 9999999
common_flags := -source 1.7 -target 1.7 -Xmaxerrs 9999999
endif

View File

@ -138,11 +138,22 @@ $(warning ************************************************************)
$(error Directory names containing spaces not supported)
endif
# Check for the current JDK.
#
# For Java 1.7, we require OpenJDK on linux and Oracle JDK on Mac OS.
# For Java 1.6, we require Oracle for all host OSes.
requires_openjdk := false
ifneq ($(EXPERIMENTAL_USE_JAVA7),)
ifeq ($(HOST_OS), linux)
requires_openjdk := true
endif
endif
java_version_str := $(shell java -version 2>&1)
javac_version_str := $(shell javac -version 2>&1)
# Check for the current jdk
ifneq ($(EXPERIMENTAL_USE_JAVA7_OPENJDK),)
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),)
@ -152,7 +163,7 @@ $(info $(java_version_str).)
$(info ************************************************************)
$(error stop)
endif # java version is not OpenJdk
else # if EXPERIMENTAL_USE_JAVA7_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.)
@ -163,21 +174,21 @@ $(info $(space)$(space)$(space)$(space)https://source.android.com/source/downloa
$(info ************************************************************)
$(error stop)
endif # java version is not Sun Oracle JDK
endif # if EXPERIMENTAL_USE_JAVA7_OPENJDK
endif # if requires_openjdk
# Check for the correct version of java, should be 1.7 if
# EXPERIMENTAL_USE_JAVA7_OPENJDK is set, 1.6 otherwise.
ifneq ($(EXPERIMENTAL_USE_JAVA7_OPENJDK),)
required_version := "OpenJDK 1.7"
# EXPERIMENTAL_USE_JAVA7 is set, 1.6 otherwise.
ifneq ($(EXPERIMENTAL_USE_JAVA7),)
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[\. "$$]')
else # if EXPERIMENTAL_USE_JAVA7_OPENJDK
required_version := "JavaSE 1.6"
else # if EXPERIMENTAL_USE_JAVA7
required_version := "1.6.x"
required_javac_version := "1.6"
java_version := $(shell echo '$(java_version_str)' | grep '^java .*[ "]1\.6[\. "$$]')
javac_version := $(shell echo '$(javac_version_str)' | head -n 1 | grep '[ "]1\.6[\. "$$]')
endif # if EXPERIMENTAL_USE_JAVA7_OPENJDK
endif # if EXPERIMENTAL_USE_JAVA7
ifeq ($(strip $(java_version)),)
$(info ************************************************************)