summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorTim Roes <tim.roes88@googlemail.com>2013-02-23 20:25:00 +0100
committerTim Roes <tim.roes88@googlemail.com>2013-02-23 20:25:00 +0100
commit304f5194fdfd999a5e8bceef1ff260958b041d52 (patch)
tree3fe12653fd7884d55b7845c9d7928cc02d9fb2e2 /core
parent33b190f6c6653b3c3493c725a96ff340c4466604 (diff)
downloadbuild-304f5194fdfd999a5e8bceef1ff260958b041d52.zip
build-304f5194fdfd999a5e8bceef1ff260958b041d52.tar.gz
build-304f5194fdfd999a5e8bceef1ff260958b041d52.tar.bz2
Fixed error message for using OpenJDK.
Output a meaningful error message, when OpenJDK is detected instead of giving the "wrong java version" output. That output confused several users (from experiences in IRC) since it gives you an output like "You are using java version 1.6.0, right version would be Java SE 1.6". Change-Id: I31ceeb03f1f98524b2b7de9b8be45231985fdb9e Signed-off-by: Tim Roes <tim.roes88@googlemail.com>
Diffstat (limited to 'core')
-rw-r--r--core/main.mk14
1 files changed, 11 insertions, 3 deletions
diff --git a/core/main.mk b/core/main.mk
index 0c70d92..e03d873 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -121,12 +121,20 @@ $(warning ************************************************************)
$(error Directory names containing spaces not supported)
endif
+# Check for the corrent jdk
+ifneq ($(shell java -version 2>&1 | 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
# Check for the correct version of java
java_version := $(shell java -version 2>&1 | head -n 1 | grep '^java .*[ "]1\.6[\. "$$]')
-ifneq ($(shell java -version 2>&1 | grep -i openjdk),)
-java_version :=
-endif
ifeq ($(strip $(java_version)),)
$(info ************************************************************)
$(info You are attempting to build with the incorrect version)