5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# This code is free software; you can redistribute it and/or modify it
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# under the terms of the GNU General Public License version 2 only, as
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# published by the Free Software Foundation.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# This code is distributed in the hope that it will be useful, but WITHOUT
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# version 2 for more details (a copy is included in the LICENSE file that
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# accompanied this code).
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# You should have received a copy of the GNU General Public License version
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# 2 along with this work; if not, write to the Free Software Foundation,
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# or visit www.oracle.com if you need additional information or have any
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# This makefile (trace.make) is included from the trace.make in the
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# build directories.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# It knows how to build and run the tools to generate trace files.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkinclude $(GAMMADIR)/make/solaris/makefiles/rules.make
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkinclude $(GAMMADIR)/make/altsrc.make
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# #########################################################################
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkHAS_ALT_SRC:=$(shell if [ -d $(HS_ALT_SRC)/share/vm/trace ]; then \
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk echo "true"; else echo "false";\
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkTOPDIR = $(shell echo `pwd`)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkGENERATED = $(TOPDIR)/../generated
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkJvmtiOutDir = $(GENERATED)/jvmtifiles
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkTraceOutDir = $(GENERATED)/tracefiles
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkTraceAltSrcDir = $(HS_ALT_SRC)/share/vm/trace
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkTraceSrcDir = $(HS_COMMON_SRC)/share/vm/trace
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# set VPATH so make knows where to look for source files
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkSrc_Dirs_V += $(TraceSrcDir) $(TraceAltSrcDir)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkVPATH += $(Src_Dirs_V:%=%:)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkTraceGeneratedNames = \
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkifeq ($(HAS_ALT_SRC), true)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkTraceGeneratedNames += \
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkifeq ($(INCLUDE_TRACE), 1)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkTraceGeneratedNames += traceProducer.cpp
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkTraceGeneratedFiles = $(TraceGeneratedNames:%=$(TraceOutDir)/%)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkXSLT = $(REMOTE) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiGen
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkXML_DEPS = $(TraceSrcDir)/trace.xml $(TraceSrcDir)/tracetypes.xml \
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk $(TraceSrcDir)/trace.dtd $(TraceSrcDir)/xinclude.mod
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkifeq ($(HAS_ALT_SRC), true)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk XML_DEPS += $(TraceAltSrcDir)/traceevents.xml
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk.PHONY: all clean cleanall
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# #########################################################################
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkall: $(TraceGeneratedFiles)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkGENERATE_CODE= \
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk $(QUIETLY) echo Generating $@; \
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk $(XSLT) -IN $(word 1,$^) -XSL $(word 2,$^) -OUT $@; \
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk$(TraceOutDir)/traceEventIds.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceEventIds.xsl $(XML_DEPS)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk $(GENERATE_CODE)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk$(TraceOutDir)/traceTypes.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceTypes.xsl $(XML_DEPS)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk $(GENERATE_CODE)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkifeq ($(HAS_ALT_SRC), false)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk$(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceEventClasses.xsl $(XML_DEPS)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk $(GENERATE_CODE)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk$(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceEventClasses.xsl $(XML_DEPS)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk $(GENERATE_CODE)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk$(TraceOutDir)/traceProducer.cpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceProducer.xsl $(XML_DEPS)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk $(GENERATE_CODE)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk$(TraceOutDir)/traceRequestables.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceRequestables.xsl $(XML_DEPS)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk $(GENERATE_CODE)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk$(TraceOutDir)/traceEventControl.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceEventControl.xsl $(XML_DEPS)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk $(GENERATE_CODE)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk# #########################################################################
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkclean cleanall:
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk rm $(TraceGeneratedFiles)