author | joehw |
Wed, 17 Feb 2016 16:32:51 -0800 | |
changeset 36029 | a847c5a7e22d |
parent 33773 | caf1d935e1c7 |
child 36384 | b0b41336a9a8 |
permissions | -rw-r--r-- |
18025 | 1 |
# |
33773
caf1d935e1c7
8141035: Let jvmtiGen exit with a non-zero exit code upon failure
sspitsyn
parents:
26691
diff
changeset
|
2 |
# Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. |
18025 | 3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
# |
|
5 |
# This code is free software; you can redistribute it and/or modify it |
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
|
7 |
# published by the Free Software Foundation. |
|
8 |
# |
|
9 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
# accompanied this code). |
|
14 |
# |
|
15 |
# You should have received a copy of the GNU General Public License version |
|
16 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
# |
|
19 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
# or visit www.oracle.com if you need additional information or have any |
|
21 |
# questions. |
|
22 |
# |
|
23 |
# |
|
24 |
||
25 |
# This makefile (trace.make) is included from the trace.make in the |
|
26 |
# build directories. |
|
27 |
# |
|
28 |
# It knows how to build and run the tools to generate trace files. |
|
29 |
||
30 |
include $(GAMMADIR)/make/solaris/makefiles/rules.make |
|
31 |
include $(GAMMADIR)/make/altsrc.make |
|
32 |
||
33 |
# ######################################################################### |
|
34 |
||
35 |
HAS_ALT_SRC:=$(shell if [ -d $(HS_ALT_SRC)/share/vm/trace ]; then \ |
|
36 |
echo "true"; else echo "false";\ |
|
37 |
fi) |
|
38 |
||
39 |
TOPDIR = $(shell echo `pwd`) |
|
40 |
GENERATED = $(TOPDIR)/../generated |
|
41 |
JvmtiOutDir = $(GENERATED)/jvmtifiles |
|
42 |
TraceOutDir = $(GENERATED)/tracefiles |
|
43 |
||
44 |
TraceAltSrcDir = $(HS_ALT_SRC)/share/vm/trace |
|
45 |
TraceSrcDir = $(HS_COMMON_SRC)/share/vm/trace |
|
46 |
||
47 |
# set VPATH so make knows where to look for source files |
|
48 |
Src_Dirs_V += $(TraceSrcDir) $(TraceAltSrcDir) |
|
49 |
VPATH += $(Src_Dirs_V:%=%:) |
|
50 |
||
51 |
TraceGeneratedNames = \ |
|
52 |
traceEventClasses.hpp \ |
|
53 |
traceEventIds.hpp \ |
|
54 |
traceTypes.hpp |
|
55 |
||
56 |
ifeq ($(HAS_ALT_SRC), true) |
|
57 |
TraceGeneratedNames += \ |
|
58 |
traceRequestables.hpp \ |
|
59 |
traceEventControl.hpp \ |
|
60 |
traceProducer.cpp |
|
61 |
endif |
|
62 |
||
63 |
TraceGeneratedFiles = $(TraceGeneratedNames:%=$(TraceOutDir)/%) |
|
64 |
||
65 |
XSLT = $(REMOTE) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiGen |
|
66 |
||
67 |
XML_DEPS = $(TraceSrcDir)/trace.xml $(TraceSrcDir)/tracetypes.xml \ |
|
68 |
$(TraceSrcDir)/trace.dtd $(TraceSrcDir)/xinclude.mod |
|
69 |
ifeq ($(HAS_ALT_SRC), true) |
|
70 |
XML_DEPS += $(TraceAltSrcDir)/traceevents.xml |
|
71 |
endif |
|
72 |
||
73 |
.PHONY: all clean cleanall |
|
74 |
||
75 |
# ######################################################################### |
|
76 |
||
77 |
all: $(TraceGeneratedFiles) |
|
78 |
||
79 |
GENERATE_CODE= \ |
|
26691
40ea2c41f53b
8056999: Make hotspot builds less verbose on default log level
ihse
parents:
18025
diff
changeset
|
80 |
$(QUIETLY) echo $(LOG_INFO) Generating $@; \ |
33773
caf1d935e1c7
8141035: Let jvmtiGen exit with a non-zero exit code upon failure
sspitsyn
parents:
26691
diff
changeset
|
81 |
$(XSLT) -IN $(word 1,$^) -XSL $(word 2,$^) -OUT $@ |
18025 | 82 |
|
83 |
$(TraceOutDir)/traceEventIds.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceEventIds.xsl $(XML_DEPS) |
|
84 |
$(GENERATE_CODE) |
|
85 |
||
86 |
$(TraceOutDir)/traceTypes.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceTypes.xsl $(XML_DEPS) |
|
87 |
$(GENERATE_CODE) |
|
88 |
||
89 |
ifeq ($(HAS_ALT_SRC), false) |
|
90 |
||
91 |
$(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceEventClasses.xsl $(XML_DEPS) |
|
92 |
$(GENERATE_CODE) |
|
93 |
||
94 |
else |
|
95 |
||
96 |
$(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceEventClasses.xsl $(XML_DEPS) |
|
97 |
$(GENERATE_CODE) |
|
98 |
||
99 |
$(TraceOutDir)/traceProducer.cpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceProducer.xsl $(XML_DEPS) |
|
100 |
$(GENERATE_CODE) |
|
101 |
||
102 |
$(TraceOutDir)/traceRequestables.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceRequestables.xsl $(XML_DEPS) |
|
103 |
$(GENERATE_CODE) |
|
104 |
||
105 |
$(TraceOutDir)/traceEventControl.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceEventControl.xsl $(XML_DEPS) |
|
106 |
$(GENERATE_CODE) |
|
107 |
||
108 |
endif |
|
109 |
||
110 |
# ######################################################################### |
|
111 |
||
112 |
clean cleanall: |
|
113 |
rm $(TraceGeneratedFiles) |