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
diff --git a/core/config.mk b/core/config.mk
index eb21943..e6295d8 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -264,6 +264,10 @@
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