From 75ebdd6e7ded4a56c2265aca527f9b1cee43add3 Mon Sep 17 00:00:00 2001 From: Tobias Thierer Date: Thu, 20 Jul 2017 19:06:59 +0100 Subject: [PATCH] droiddoc: Fix trailing ':' in -classpath, -sourcepath values full_java_lib_deps has trailing whitespace if $(LOCAL_CLASSPATH) is empty. Because the calculation of PRIVATE_CLASSPATH was missing a $(strip ...), this resulted in an (unintentional) trailing ':' in the values of the -classpath and -sourcepath arguments to the javadoc tool, which that tool is documented to interpret as '.' (the working directory). This CL converts the expression to a call to normalize-path-list, from definitions.mk, which contains the $(strip ...): define normalize-path-list $(subst $(space),:,$(strip $(1))) endef After this CL, an empty $(LOCAL_CLASSPATH) no longer gets misinterpreted as the current working directory. This issue was minor (it made no difference in practice). Test: Treehugger Bug: 62049770 Change-Id: Ia0e3e5657d0fa057fe998515f34bc7b8df5f6f16 --- core/droiddoc.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/droiddoc.mk b/core/droiddoc.mk index 48a930d48..4b0ec256e 100644 --- a/core/droiddoc.mk +++ b/core/droiddoc.mk @@ -86,8 +86,7 @@ full_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES)) $(LOCAL_CLASSPA full_java_lib_deps := $(call java-lib-deps,$(LOCAL_JAVA_LIBRARIES)) $(LOCAL_CLASSPATH) endif # !LOCAL_IS_HOST_MODULE -$(full_target): PRIVATE_CLASSPATH := $(subst $(space),:,$(full_java_libs)) - +$(full_target): PRIVATE_CLASSPATH := $(call normalize-path-list,$(full_java_libs)) intermediates.COMMON := $(call local-intermediates-dir,COMMON)