< prev index next >

make/hotspot/gensrc/GensrcJvmti.gmk

Print this page

        

@@ -1,7 +1,7 @@
 #
-# Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License version 2 only, as
 # published by the Free Software Foundation.  Oracle designates this

@@ -26,11 +26,10 @@
 $(eval $(call IncludeCustomExtension, hotspot/gensrc/GensrcJvmti.gmk))
 
 ################################################################################
 # 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
 
 $(eval $(call SetupJavaCompiler, GENERATE_OLDBYTECODE, \
     JAVAC := $(JAVAC), \

@@ -63,21 +62,20 @@
 #   OUTPUT_DIR -- The directory to put the generated file in
 #   ARGS -- Additional arguments to the jvmtiGen tool
 #   DEPS -- Additional dependencies
 SetupXslTransform = $(NamedParamsMacroTemplate)
 define SetupXslTransformBody
-  $1_OUTPUT_FILE := $$($1_OUTPUT_DIR)/$1
+  $$($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 $$@
 
-  $$(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)
+  TARGETS += $$($1_OUTPUT_DIR)/$1
 endef
 
 ################################################################################
 # Create JVMTI files in gensrc/jvmtifiles
 

@@ -98,21 +96,16 @@
       DEPS := $$(JVMTI_SRCDIR)/jvmtiLib.xsl, \
   ))
 endef
 
 $(eval $(call SetupJvmtiGeneration, jvmtiEnter.cpp, jvmtiEnter.xsl, \
-    -PARAM majorversion $(VERSION_FEATURE) \
     -PARAM interface jvmti))
 $(eval $(call SetupJvmtiGeneration, jvmtiEnterTrace.cpp, jvmtiEnter.xsl, \
-    -PARAM majorversion $(VERSION_FEATURE) \
     -PARAM interface jvmti -PARAM trace Trace))
-$(eval $(call SetupJvmtiGeneration, jvmtiEnv.hpp, jvmtiHpp.xsl, \
-    -PARAM majorversion $(VERSION_FEATURE)))
-$(eval $(call SetupJvmtiGeneration, jvmti.h, jvmtiH.xsl, \
-    -PARAM majorversion $(VERSION_FEATURE)))
-$(eval $(call SetupJvmtiGeneration, jvmti.html, jvmti.xsl, \
-    -PARAM majorversion $(VERSION_FEATURE)))
+$(eval $(call SetupJvmtiGeneration, jvmtiEnv.hpp, jvmtiHpp.xsl))
+$(eval $(call SetupJvmtiGeneration, jvmti.h, jvmtiH.xsl))
+$(eval $(call SetupJvmtiGeneration, jvmti.html, jvmti.xsl))
 
 JVMTI_BC_SRCDIR := $(TOPDIR)/src/hotspot/share/interpreter
 
 $(eval $(call SetupXslTransform, bytecodeInterpreterWithChecks.cpp, \
     XML_FILE := $(JVMTI_BC_SRCDIR)/bytecodeInterpreterWithChecks.xml, \
< prev index next >