jdk/make/gensrc/Gensrc-jdk.jdi.gmk
author psadhukhan
Tue, 17 Nov 2015 19:15:48 +0300
changeset 34403 b4ca8477370e
parent 27953 03e0e3891572
child 33669 1082bb5cff16
permissions -rw-r--r--
8039412: Stack overflow on Linux using DialogTypeSelection.NATIVE Reviewed-by: prr, rchamyal
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     1
#
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
     2
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     4
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    10
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    15
# accompanied this code).
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    16
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    20
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    23
# questions.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    24
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    25
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    26
include GensrcCommon.gmk
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    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
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    33
HEADER_FILE := $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    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
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    36
# Both the header and java file are created using the same recipe. By declaring
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    37
# this rule and adding header file to dependencies for java file, both are 
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    38
# rebuilt if either is missing
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    39
$(HEADER_FILE): $(JDWP_SPEC_FILE) $(BUILD_TOOLS_JDK)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    40
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    41
# Touch the target of this rule at the end to avoid triggering false rebuilds
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    42
$(JAVA_FILE): $(JDWP_SPEC_FILE) $(BUILD_TOOLS_JDK) $(HEADER_FILE)
26717
d65c07a65486 8055189: Cleanup gensrc after source code restructure
erikj
parents: 25859
diff changeset
    43
	$(MKDIR) -p $(@D)
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    44
	$(MKDIR) -p $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    45
	$(RM) $@ $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h
26717
d65c07a65486 8055189: Cleanup gensrc after source code restructure
erikj
parents: 25859
diff changeset
    46
	$(ECHO) $(LOG_INFO) Creating JDWP.java and JDWPCommands.h from jdwp.spec
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    47
	$(TOOL_JDWPGEN) $< -jdi $@ -include \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    48
	    $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    49
	$(TOUCH) $@
26717
d65c07a65486 8055189: Cleanup gensrc after source code restructure
erikj
parents: 25859
diff changeset
    50
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    51
$(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
    52
    $(BUILD_TOOLS_JDK)
d65c07a65486 8055189: Cleanup gensrc after source code restructure
erikj
parents: 25859
diff changeset
    53
	$(MKDIR) -p $(@D)
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
	$(ECHO) $(LOG_INFO) Creating $(@F) from jdwp.spec
d65c07a65486 8055189: Cleanup gensrc after source code restructure
erikj
parents: 25859
diff changeset
    56
	$(TOOL_JDWPGEN) $< -doc $@
d65c07a65486 8055189: Cleanup gensrc after source code restructure
erikj
parents: 25859
diff changeset
    57
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    58
GENSRC_JDWP := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    59
    $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    60
    $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html
26717
d65c07a65486 8055189: Cleanup gensrc after source code restructure
erikj
parents: 25859
diff changeset
    61
GENSRC_JDK_JDI += $(GENSRC_JDWP)
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
d65c07a65486 8055189: Cleanup gensrc after source code restructure
erikj
parents: 25859
diff changeset
    65
define process-provider
d65c07a65486 8055189: Cleanup gensrc after source code restructure
erikj
parents: 25859
diff changeset
    66
	$(MKDIR) -p $(@D)
d65c07a65486 8055189: Cleanup gensrc after source code restructure
erikj
parents: 25859
diff changeset
    67
	$(CAT) $^ | $(SED) -e "s/^#\[$(OPENJDK_TARGET_OS)\]//" > $@
d65c07a65486 8055189: Cleanup gensrc after source code restructure
erikj
parents: 25859
diff changeset
    68
endef
d65c07a65486 8055189: Cleanup gensrc after source code restructure
erikj
parents: 25859
diff changeset
    69
d65c07a65486 8055189: Cleanup gensrc after source code restructure
erikj
parents: 25859
diff changeset
    70
# Filter com.sun.jdi.connect.Connector
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    71
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector: \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    72
    $(JDK_TOPDIR)/src/jdk.jdi/share/classes/META-INF/services/com.sun.jdi.connect.Connector \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    73
    $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services
26717
d65c07a65486 8055189: Cleanup gensrc after source code restructure
erikj
parents: 25859
diff changeset
    74
	$(process-provider)
d65c07a65486 8055189: Cleanup gensrc after source code restructure
erikj
parents: 25859
diff changeset
    75
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    76
# Copy the same service file into jdk.hotspot.agent so that they are kept the same.
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    77
$(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/META-INF/services/com.sun.jdi.connect.Connector: \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    78
    $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    79
	$(install-file)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27088
diff changeset
    80
27953
03e0e3891572 8066589: Make importing sa-jdi.jar optional on its existance
simonis
parents: 27565
diff changeset
    81
# Some platforms don't have the serviceability agent
03e0e3891572 8066589: Make importing sa-jdi.jar optional on its existance
simonis
parents: 27565
diff changeset
    82
ifeq (, $(filter $(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), aix-ppc64))
03e0e3891572 8066589: Make importing sa-jdi.jar optional on its existance
simonis
parents: 27565
diff changeset
    83
  ifneq ($(JVM_VARIANT_ZERO), true)
03e0e3891572 8066589: Make importing sa-jdi.jar optional on its existance
simonis
parents: 27565
diff changeset
    84
    GENSRC_JDK_JDI += $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector \
03e0e3891572 8066589: Make importing sa-jdi.jar optional on its existance
simonis
parents: 27565
diff changeset
    85
        $(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/META-INF/services/com.sun.jdi.connect.Connector
03e0e3891572 8066589: Make importing sa-jdi.jar optional on its existance
simonis
parents: 27565
diff changeset
    86
  endif
03e0e3891572 8066589: Make importing sa-jdi.jar optional on its existance
simonis
parents: 27565
diff changeset
    87
endif
26717
d65c07a65486 8055189: Cleanup gensrc after source code restructure
erikj
parents: 25859
diff changeset
    88
d65c07a65486 8055189: Cleanup gensrc after source code restructure
erikj
parents: 25859
diff changeset
    89
################################################################################
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    90
27088
ea6446a9121b 8055191: Split GensrcProperties.gmk into separate modules
erikj
parents: 26717
diff changeset
    91
include GensrcProperties.gmk
ea6446a9121b 8055191: Split GensrcProperties.gmk into separate modules
erikj
parents: 26717
diff changeset
    92
ea6446a9121b 8055191: Split GensrcProperties.gmk into separate modules
erikj
parents: 26717
diff changeset
    93
$(eval $(call SetupCompileProperties,COMPILE_PROPERTIES, \
ea6446a9121b 8055191: Split GensrcProperties.gmk into separate modules
erikj
parents: 26717
diff changeset
    94
    $(filter %.properties, \
ea6446a9121b 8055191: Split GensrcProperties.gmk into separate modules
erikj
parents: 26717
diff changeset
    95
        $(call CacheFind, $(JDK_TOPDIR)/src/jdk.jdi/share/classes/com/sun/tools/jdi/resources)), \
ea6446a9121b 8055191: Split GensrcProperties.gmk into separate modules
erikj
parents: 26717
diff changeset
    96
    ListResourceBundle))
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
GENSRC_JDK_JDI += $(COMPILE_PROPERTIES)
ea6446a9121b 8055191: Split GensrcProperties.gmk into separate modules
erikj
parents: 26717
diff changeset
    99
ea6446a9121b 8055191: Split GensrcProperties.gmk into separate modules
erikj
parents: 26717
diff changeset
   100
################################################################################
ea6446a9121b 8055191: Split GensrcProperties.gmk into separate modules
erikj
parents: 26717
diff changeset
   101
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   102
jdk.jdi: $(GENSRC_JDK_JDI)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   103
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   104
all: jdk.jdi
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   105
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   106
.PHONY: all jdk.jdi