make/windows/makefiles/jfr.make

changeset 9858
b985cbb00e68
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/make/windows/makefiles/jfr.make	Mon Aug 12 18:30:40 2019 +0300
     1.3 @@ -0,0 +1,81 @@
     1.4 +#
     1.5 +# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 +# Copyright (c) 2018-2019, Azul Systems, Inc. All rights reserved.
     1.7 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8 +#
     1.9 +# This code is free software; you can redistribute it and/or modify it
    1.10 +# under the terms of the GNU General Public License version 2 only, as
    1.11 +# published by the Free Software Foundation.
    1.12 +#
    1.13 +# This code is distributed in the hope that it will be useful, but WITHOUT
    1.14 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.15 +# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.16 +# version 2 for more details (a copy is included in the LICENSE file that
    1.17 +# accompanied this code).
    1.18 +#
    1.19 +# You should have received a copy of the GNU General Public License version
    1.20 +# 2 along with this work; if not, write to the Free Software Foundation,
    1.21 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.22 +#
    1.23 +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.24 +# or visit www.oracle.com if you need additional information or have any
    1.25 +# questions.
    1.26 +#  
    1.27 +#
    1.28 +
    1.29 +# This makefile (jfr.make) is included from the jfr.make in the
    1.30 +# build directories.
    1.31 +#
    1.32 +# It knows how to build and run the tools to generate jfr.
    1.33 +
    1.34 +!include $(WorkSpace)/make/windows/makefiles/rules.make
    1.35 +
    1.36 +# #########################################################################
    1.37 +# Build tools needed for the Jfr source code generation
    1.38 +
    1.39 +GENERATED   = ../generated
    1.40 +
    1.41 +JFR_TOOLS_SRCDIR = $(WorkSpace)/src/share/vm/jfr
    1.42 +JFR_TOOLS_OUTPUTDIR = $(GENERATED)/tools/jfr
    1.43 +
    1.44 +JFR_OUTPUTDIR = $(GENERATED)/jfrfiles
    1.45 +JFR_SRCDIR = $(WorkSpace)/src/share/vm/jfr/metadata
    1.46 +
    1.47 +METADATA_XML = $(JFR_SRCDIR)/metadata.xml
    1.48 +METADATA_XSD = $(JFR_SRCDIR)/metadata.xsd
    1.49 +
    1.50 +# Changing these will trigger a rebuild of generated jfr files.
    1.51 +JFR_DEPS = $(METADATA_XML) \
    1.52 +	$(METADATA_XSD)
    1.53 +
    1.54 +JfrGeneratedFiles = \
    1.55 +	$(JFR_OUTPUTDIR)/jfrEventControl.hpp \
    1.56 +	$(JFR_OUTPUTDIR)/jfrEventIds.hpp \
    1.57 +	$(JFR_OUTPUTDIR)/jfrPeriodic.hpp \
    1.58 +	$(JFR_OUTPUTDIR)/jfrTypes.hpp
    1.59 +
    1.60 +JfrGenSource = $(JFR_TOOLS_SRCDIR)/GenerateJfrFiles.java
    1.61 +JfrGenClass = $(JFR_TOOLS_OUTPUTDIR)/build/tools/jfr/GenerateJfrFiles.class
    1.62 +
    1.63 +.PHONY: all cleanall
    1.64 +
    1.65 +# #########################################################################
    1.66 +
    1.67 +all: $(JfrGeneratedFiles)
    1.68 +
    1.69 +$(JfrGenClass): $(JfrGenSource)
    1.70 +	mkdir -p $(@D)
    1.71 +	$(COMPILE_JAVAC) -d $(JFR_TOOLS_OUTPUTDIR) $(JfrGenSource)
    1.72 +
    1.73 +$(JFR_OUTPUTDIR)/jfrEventClasses.hpp: $(METADATA_XML) $(METADATA_XSD) $(JfrGenClass)
    1.74 +	echo Generating $(@F)
    1.75 +	mkdir -p $(@D)
    1.76 +	$(RUN_JAVA) -cp $(JFR_TOOLS_OUTPUTDIR) build.tools.jfr.GenerateJfrFiles $(METADATA_XML) $(METADATA_XSD) $(JFR_OUTPUTDIR)
    1.77 +	test -f $@
    1.78 +
    1.79 +$(JfrGeneratedFiles): $(JFR_OUTPUTDIR)/jfrEventClasses.hpp
    1.80 +
    1.81 +# #########################################################################
    1.82 +
    1.83 +cleanall :
    1.84 +	rm $(JfrGenClass) $(JfrGeneratedFiles) $(JFR_OUTPUTDIR)/jfrEventClasses.hpp

mercurial