author | chegar |
Thu, 03 Mar 2016 12:07:13 +0000 | |
changeset 36225 | 6ae0eebc46e9 |
parent 35781 | 88c56fe09cb8 |
child 36511 | 9d0388c6b336 |
permissions | -rw-r--r-- |
25859 | 1 |
# |
35781 | 2 |
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
25859 | 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. Oracle designates this |
|
8 |
# particular file as subject to the "Classpath" exception as provided |
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
|
10 |
# |
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
# accompanied this code). |
|
16 |
# |
|
17 |
# You should have received a copy of the GNU General Public License version |
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
# |
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 |
# or visit www.oracle.com if you need additional information or have any |
|
23 |
# questions. |
|
24 |
# |
|
25 |
||
26 |
include GensrcCommon.gmk |
|
27 |
||
26717
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
28 |
################################################################################ |
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
29 |
# Translate the Java debugger wire protocol (jdwp.spec) file into a JDWP.java file |
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
30 |
# and a JDWPCommands.h C-header file. |
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
31 |
|
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
32 |
JDWP_SPEC_FILE := $(JDK_TOPDIR)/make/data/jdwp/jdwp.spec |
27565 | 33 |
HEADER_FILE := $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h |
34 |
JAVA_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java |
|
26717
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
35 |
|
27565 | 36 |
# Both the header and java file are created using the same recipe. By declaring |
33669
1082bb5cff16
8142383: Use named arguments for SetupCompileProperties in jdk
ihse
parents:
27953
diff
changeset
|
37 |
# this rule and adding header file to dependencies for java file, both are |
27565 | 38 |
# rebuilt if either is missing |
39 |
$(HEADER_FILE): $(JDWP_SPEC_FILE) $(BUILD_TOOLS_JDK) |
|
40 |
||
41 |
# Touch the target of this rule at the end to avoid triggering false rebuilds |
|
42 |
$(JAVA_FILE): $(JDWP_SPEC_FILE) $(BUILD_TOOLS_JDK) $(HEADER_FILE) |
|
35241 | 43 |
$(call LogInfo, Creating JDWP.java and JDWPCommands.h from jdwp.spec) |
44 |
$(call MakeDir, $(@D) $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent) |
|
27565 | 45 |
$(RM) $@ $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h |
46 |
$(TOOL_JDWPGEN) $< -jdi $@ -include \ |
|
47 |
$(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h |
|
48 |
$(TOUCH) $@ |
|
26717
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
49 |
|
27565 | 50 |
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html: $(JDWP_SPEC_FILE) \ |
26717
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
51 |
$(BUILD_TOOLS_JDK) |
35241 | 52 |
$(call LogInfo, Creating $(@F) from jdwp.spec) |
53 |
$(call MakeDir, $(@D)) |
|
26717
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
54 |
$(RM) $@ |
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
55 |
$(TOOL_JDWPGEN) $< -doc $@ |
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
56 |
|
27565 | 57 |
GENSRC_JDWP := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java \ |
58 |
$(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h \ |
|
59 |
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html |
|
26717
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
60 |
GENSRC_JDK_JDI += $(GENSRC_JDWP) |
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
61 |
|
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
62 |
################################################################################ |
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
63 |
|
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
64 |
define process-provider |
35241 | 65 |
$(call MakeDir, $(@D)) |
26717
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
66 |
$(CAT) $^ | $(SED) -e "s/^#\[$(OPENJDK_TARGET_OS)\]//" > $@ |
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
67 |
endef |
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
68 |
|
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
69 |
# Filter com.sun.jdi.connect.Connector |
27565 | 70 |
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector: \ |
71 |
$(JDK_TOPDIR)/src/jdk.jdi/share/classes/META-INF/services/com.sun.jdi.connect.Connector \ |
|
35264
9b8d97b83520
8067194: Restructure hotspot/agent/src to conform the modular source layout
dsamersoff
parents:
34374
diff
changeset
|
72 |
$(HOTSPOT_TOPDIR)/src/jdk.hotspot.agent/share/classes/META-INF/services/com.sun.jdi.connect.Connector |
26717
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
73 |
$(process-provider) |
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
74 |
|
27565 | 75 |
# Copy the same service file into jdk.hotspot.agent so that they are kept the same. |
34374
b45db1cff661
8142336: Convert the SA agent build to modular build-infra makefiles
erikj
parents:
33669
diff
changeset
|
76 |
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/META-INF/services/com.sun.jdi.connect.Connector: \ |
27565 | 77 |
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector |
78 |
$(install-file) |
|
79 |
||
27953
03e0e3891572
8066589: Make importing sa-jdi.jar optional on its existance
simonis
parents:
27565
diff
changeset
|
80 |
# Some platforms don't have the serviceability agent |
35781 | 81 |
ifeq ($(INCLUDE_SA), true) |
82 |
GENSRC_JDK_JDI += $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector \ |
|
83 |
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/META-INF/services/com.sun.jdi.connect.Connector |
|
27953
03e0e3891572
8066589: Make importing sa-jdi.jar optional on its existance
simonis
parents:
27565
diff
changeset
|
84 |
endif |
26717
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
85 |
|
d65c07a65486
8055189: Cleanup gensrc after source code restructure
erikj
parents:
25859
diff
changeset
|
86 |
################################################################################ |
25859 | 87 |
|
27088
ea6446a9121b
8055191: Split GensrcProperties.gmk into separate modules
erikj
parents:
26717
diff
changeset
|
88 |
include GensrcProperties.gmk |
ea6446a9121b
8055191: Split GensrcProperties.gmk into separate modules
erikj
parents:
26717
diff
changeset
|
89 |
|
33669
1082bb5cff16
8142383: Use named arguments for SetupCompileProperties in jdk
ihse
parents:
27953
diff
changeset
|
90 |
$(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ |
1082bb5cff16
8142383: Use named arguments for SetupCompileProperties in jdk
ihse
parents:
27953
diff
changeset
|
91 |
SRC_DIRS := $(JDK_TOPDIR)/src/jdk.jdi/share/classes/com/sun/tools/jdi/resources, \ |
1082bb5cff16
8142383: Use named arguments for SetupCompileProperties in jdk
ihse
parents:
27953
diff
changeset
|
92 |
CLASS := ListResourceBundle, \ |
1082bb5cff16
8142383: Use named arguments for SetupCompileProperties in jdk
ihse
parents:
27953
diff
changeset
|
93 |
)) |
27088
ea6446a9121b
8055191: Split GensrcProperties.gmk into separate modules
erikj
parents:
26717
diff
changeset
|
94 |
|
ea6446a9121b
8055191: Split GensrcProperties.gmk into separate modules
erikj
parents:
26717
diff
changeset
|
95 |
GENSRC_JDK_JDI += $(COMPILE_PROPERTIES) |
ea6446a9121b
8055191: Split GensrcProperties.gmk into separate modules
erikj
parents:
26717
diff
changeset
|
96 |
|
ea6446a9121b
8055191: Split GensrcProperties.gmk into separate modules
erikj
parents:
26717
diff
changeset
|
97 |
################################################################################ |
ea6446a9121b
8055191: Split GensrcProperties.gmk into separate modules
erikj
parents:
26717
diff
changeset
|
98 |
|
25859 | 99 |
jdk.jdi: $(GENSRC_JDK_JDI) |
100 |
||
101 |
all: jdk.jdi |
|
102 |
||
103 |
.PHONY: all jdk.jdi |