1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/make/aix/makefiles/jfr.make Tue Apr 21 12:03:29 2020 +0200 1.3 @@ -0,0 +1,92 @@ 1.4 +# 1.5 +# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. 1.6 +# Copyright (c) 2020 SAP SE. 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 $(GAMMADIR)/make/linux/makefiles/rules.make 1.35 + 1.36 +# ######################################################################### 1.37 +# Build tools needed for the Jfr source code generation 1.38 + 1.39 +TOPDIR = $(shell echo `pwd`) 1.40 +GENERATED = $(TOPDIR)/../generated 1.41 + 1.42 +JFR_TOOLS_SRCDIR := $(GAMMADIR)/src/share/vm/jfr 1.43 +JFR_TOOLS_OUTPUTDIR := $(GENERATED)/tools/jfr 1.44 + 1.45 +JFR_OUTPUTDIR := $(GENERATED)/jfrfiles 1.46 +JFR_SRCDIR := $(GAMMADIR)/src/share/vm/jfr/metadata 1.47 + 1.48 +METADATA_XML ?= $(JFR_SRCDIR)/metadata.xml 1.49 +METADATA_XSD ?= $(JFR_SRCDIR)/metadata.xsd 1.50 + 1.51 +# Changing these will trigger a rebuild of generated jfr files. 1.52 +JFR_DEPS += \ 1.53 + $(METADATA_XML) \ 1.54 + $(METADATA_XSD) \ 1.55 + # 1.56 + 1.57 +JfrGeneratedNames = \ 1.58 + jfrEventClasses.hpp \ 1.59 + jfrEventControl.hpp \ 1.60 + jfrEventIds.hpp \ 1.61 + jfrPeriodic.hpp \ 1.62 + jfrTypes.hpp 1.63 + 1.64 +JfrGenSource = $(JFR_TOOLS_SRCDIR)/GenerateJfrFiles.java 1.65 +JfrGenClass = $(JFR_TOOLS_OUTPUTDIR)/build/tools/jfr/GenerateJfrFiles.class 1.66 + 1.67 +JfrGeneratedFiles = $(JfrGeneratedNames:%=$(JFR_OUTPUTDIR/%) 1.68 + 1.69 +.PHONY: all clean cleanall 1.70 + 1.71 +# ######################################################################### 1.72 + 1.73 +all: $(JfrGeneratedFiles) 1.74 + 1.75 +$(JfrGenClass): $(JfrGenSource) 1.76 + mkdir -p $(@D) 1.77 + $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -d $(JFR_TOOLS_OUTPUTDIR) $(JfrGenSource) 1.78 + 1.79 +$(JFR_OUTPUTDIR)/jfrEventClasses.hpp: $(METADATA_XML) $(METADATA_XSD) $(JfrGenClass) 1.80 + $(QUIETLY) echo Generating $(@F) 1.81 + mkdir -p $(@D) 1.82 + $(QUIETLY) $(REMOTE) $(RUN.JAVA) -cp $(JFR_TOOLS_OUTPUTDIR) build.tools.jfr.GenerateJfrFiles $(METADATA_XML) $(METADATA_XSD) $(JFR_OUTPUTDIR) 1.83 + test -f $@ 1.84 + 1.85 +$(filter-out $(JFR_OUTPUTDIR)/jfrEventClasses.hpp, $(JfrGeneratedFiles)): $(JFR_OUTPUTDIR)/jfrEventClasses.hpp 1.86 + 1.87 +TARGETS += $(JFR_OUTPUTDIR)/jfrEventClasses.hpp 1.88 + 1.89 +# ######################################################################### 1.90 + 1.91 +clean cleanall : 1.92 + rm $(JfrGenClass) $(JfrGeneratedFiles) 1.93 + 1.94 +# ######################################################################### 1.95 +