Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec5e729f authored by Ying Wang's avatar Ying Wang
Browse files

Make build/core/find-jdk-tools-jar.sh fail more explicitly

http://b/issue?id=1505957
Before this change, if tools.jar can not be found, make reports error like:
make: *** No rule to make target `Please-install-JDK-5.0,-update-12-or-higher,-which-you-can-download-from-java.sun.com'...
With this change, the error message is much nicer:
build/core/config.mk:264: *** Error: could not find jdk tools.jar, please install JDK-5.0, update 12 or higher, which you can download from java.sun.com.  Stop.

Change-Id: Id33cfb6ee7676d66f00d0a41d07c1f27abc6a402
parent 0bd59a0a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -264,6 +264,10 @@ ifeq ($(HOST_OS),darwin)
HOST_JDK_TOOLS_JAR :=
else
HOST_JDK_TOOLS_JAR:= $(shell $(BUILD_SYSTEM)/find-jdk-tools-jar.sh)
ifeq ($(wildcard $(HOST_JDK_TOOLS_JAR)),)
$(error Error: could not find jdk tools.jar, please install JDK-5.0, \
    update 12 or higher, which you can download from java.sun.com)
endif
endif

# It's called md5 on Mac OS and md5sum on Linux
+0 −1
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@ if [ "x$ANDROID_JAVA_HOME" != x ] && [ -e "$ANDROID_JAVA_HOME/lib/tools.jar" ] ;
else
    JAVAC=$(which javac)
    if [ -z "$JAVAC" ] ; then
	echo "Please-install-JDK-5.0,-update-12-or-higher,-which-you-can-download-from-java.sun.com"
	exit 1
    fi
    while [ -L $JAVAC ] ; do