make/hotspot/gensrc/GensrcJvmti.gmk
branchihse-setupexecute-branch
changeset 57155 ba61956ea598
parent 50113 caf115bb98ad
child 57230 b3b5ec7737f4
--- a/make/hotspot/gensrc/GensrcJvmti.gmk	Fri Feb 01 12:29:52 2019 +0100
+++ b/make/hotspot/gensrc/GensrcJvmti.gmk	Wed Feb 06 21:31:36 2019 +0100
@@ -28,6 +28,7 @@
 ################################################################################
 # Build tools needed for the JVMTI source code generation
 
+# FIXME: jvmtiGen.java should move to make/src, jvmtiEnvFill.java should be removed.
 JVMTI_TOOLS_SRCDIR := $(TOPDIR)/src/hotspot/share/prims
 JVMTI_TOOLS_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/tools/jvmti
 
@@ -64,16 +65,17 @@
 #   DEPS -- Additional dependencies
 SetupXslTransform = $(NamedParamsMacroTemplate)
 define SetupXslTransformBody
-  $$($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))
-        # jvmtiGen does not return error code properly on fail.
-        # NOTE: We should really fix jvmtiGen.java instead.
-	test -f $$@
+  $1_OUTPUT_FILE := $$($1_OUTPUT_DIR)/$1
 
-  TARGETS += $$($1_OUTPUT_DIR)/$1
+  $$(eval $$(call SetupExecute, jvmti_gen_$1, \
+      INFO := Generating jvmti file $1, \
+      DEPS := $$($1_XML_FILE) $$($1_XSL_FILE) $$($1_DEPS) $$(BUILD_JVMTI_TOOLS), \
+      OUTPUT_FILE := $$($1_OUTPUT_FILE), \
+      COMMAND := $$(TOOL_JVMTI_GEN) -IN $$($1_XML_FILE) \
+          -XSL $$($1_XSL_FILE) -OUT $$($1_OUTPUT_FILE) $$($1_ARGS), \
+  ))
+
+  TARGETS += $$(jvmti_gen_$1_TARGET)
 endef
 
 ################################################################################