changeset 12043:36494bc11768

8166202: Tracefile gensrc cannot handle closed src dir in different location Reviewed-by: egahlin, dholmes, tbell
author erikj
date Thu, 22 Sep 2016 08:57:37 +0200
parents 736bbd7b1433
children 6f627bebb70b 0ff97dc32114 6f006bfb560e
files make/gensrc/GensrcJvmti.gmk
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/make/gensrc/GensrcJvmti.gmk	Thu Sep 22 00:21:25 2016 +0200
+++ b/make/gensrc/GensrcJvmti.gmk	Thu Sep 22 08:57:37 2016 +0200
@@ -67,7 +67,8 @@
   $$($1_OUTPUT_DIR)/$1: $$($1_XML_FILE) $$($1_XSL_FILE) $$($1_DEPS) $$(BUILD_JVMTI_TOOLS)
 	$$(call LogInfo, Generating $$(@F))
 	$$(call MakeDir, $$(@D))
-	$$(call ExecuteWithLog, $$@, $$(TOOL_JVMTI_GEN) -IN $$($1_XML_FILE) -XSL $$($1_XSL_FILE) -OUT $$@ $$($1_ARGS))
+	$$(call ExecuteWithLog, $$@, $$(TOOL_JVMTI_GEN) -IN $$($1_XML_FILE) \
+	    -XSL $$($1_XSL_FILE) -OUT $$@ $$($1_ARGS))
         # jvmtiGen does not return error code properly on fail.
         # NOTE: We should really fix jvmtiGen.java instead.
 	test -f $$@
@@ -134,8 +135,8 @@
 TRACE_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/gensrc/tracefiles
 TRACE_SRCDIR := $(HOTSPOT_TOPDIR)/src/share/vm/trace
 
-# Append directories to search (might have been set by custom extensions)
-TRACE_SEARCH_DIRS += $(TRACE_SRCDIR)
+# Append list of XSL files to search (might have been set by custom extensions)
+TRACE_XSL_FILES += $(wildcard $(TRACE_SRCDIR)/*.xsl)
 
 TRACE_XML ?= $(TRACE_SRCDIR)/trace.xml
 
@@ -155,7 +156,7 @@
 define SetupTraceGeneration
   $$(eval $$(call SetupXslTransform, $1, \
       XML_FILE := $$(TRACE_XML), \
-      XSL_FILE := $$(firstword $$(wildcard $$(addsuffix /$$(basename $1).xsl, $$(TRACE_SEARCH_DIRS)))), \
+      XSL_FILE := $$(firstword $$(filter %/$$(basename $1).xsl, $$(TRACE_XSL_FILES))), \
       OUTPUT_DIR := $$(TRACE_OUTPUTDIR), \
       DEPS := $$(TRACE_DEPS), \
   ))