langtools/make/GensrcLangtools.gmk
author tschatzl
Thu, 09 Oct 2014 11:40:11 +0200 (2014-10-09)
changeset 27149 9246fc481aa3
parent 25874 83c19f00452c
permissions -rw-r--r--
8059758: Footprint regressions with JDK-8038423 Summary: Changes in JDK-8038423 always initialize (zero out) virtual memory used for auxiliary data structures. This causes a footprint regression for G1 in startup benchmarks. This is because they do not touch that memory at all, so the operating system does not actually commit these pages. The fix is to, if the initialization value of the data structures matches the default value of just committed memory (=0), do not do anything. Reviewed-by: jwilhelm, brutisso
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14270
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     1
#
22703
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
     2
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
14270
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     4
#
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    10
#
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    15
# accompanied this code).
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    16
#
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    20
#
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    23
# questions.
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    24
#
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    25
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    26
# This must be the first rule
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    27
default: all
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    28
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    29
include $(SPEC)
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    30
include MakeBase.gmk
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    31
include JavaCompilation.gmk
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    32
22703
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
    33
include CommonLangtools.gmk
14270
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    34
22703
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
    35
################################################################################
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
    36
# Setup the compilation of the properties compilation tool. You can depend
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    37
# upon $(BUILD_TOOLS_LANGTOOLS) to trigger a compilation of the tools. Note that 
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    38
# we add src/share/classes to the sourcepath. This is necessary since the 
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    39
# GenStubs program needs to be linked and run with the new javac sources.
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    40
$(eval $(call SetupJavaCompilation,BUILD_TOOLS_LANGTOOLS, \
20623
cb61ea12e375 8001931: The new build system whitespace cleanup
ihse
parents: 17650
diff changeset
    41
    SETUP := BOOT_JAVAC, \
cb61ea12e375 8001931: The new build system whitespace cleanup
ihse
parents: 17650
diff changeset
    42
    DISABLE_SJAVAC := true, \
cb61ea12e375 8001931: The new build system whitespace cleanup
ihse
parents: 17650
diff changeset
    43
    ADD_JAVAC_FLAGS := -Xprefer:source, \
22703
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
    44
    SRC := $(LANGTOOLS_TOPDIR)/make/tools, \
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
    45
    INCLUDES := compileproperties, \
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
    46
    BIN := $(LANGTOOLS_OUTPUTDIR)/buildtools_classes))
14270
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    47
22703
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
    48
################################################################################
14270
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    49
# The compileprops tools compiles a properties file into a resource bundle.
22703
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
    50
TOOL_COMPILEPROPS_CMD := $(JAVA) -cp $(LANGTOOLS_OUTPUTDIR)/buildtools_classes \
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
    51
    compileproperties.CompileProperties -quiet
20623
cb61ea12e375 8001931: The new build system whitespace cleanup
ihse
parents: 17650
diff changeset
    52
14270
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    53
# Lookup the properties that need to be compiled into resource bundles.
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    54
PROPSOURCES := $(shell $(FIND) $(LANGTOOLS_TOPDIR)/src/*/share/classes -name "*.properties")
20623
cb61ea12e375 8001931: The new build system whitespace cleanup
ihse
parents: 17650
diff changeset
    55
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    56
# Convert .../src/<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    57
# to .../langtools/gensrc/<module>/com/sun/tools/javac/resources/javac_zh_CN.java
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    58
# Strip away prefix and suffix, leaving for example only: 
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    59
# "<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN"
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    60
PROPJAVAS := $(patsubst $(LANGTOOLS_TOPDIR)/src/%.properties, \
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    61
    $(LANGTOOLS_OUTPUTDIR)/gensrc/%.java, \
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    62
    $(subst /share/classes,,$(PROPSOURCES)))
20623
cb61ea12e375 8001931: The new build system whitespace cleanup
ihse
parents: 17650
diff changeset
    63
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    64
# Generate the package dirs for the tobe generated java files. Sort to remove
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    65
# duplicates.
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    66
PROPDIRS := $(sort $(dir $(PROPJAVAS)))
20623
cb61ea12e375 8001931: The new build system whitespace cleanup
ihse
parents: 17650
diff changeset
    67
22703
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
    68
# Now generate a sequence of:
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
    69
# "-compile ...javac_zh_CN.properties ...javac_zh_CN.java java.util.ListResourceBundle"
14270
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    70
# suitable to be fed into the CompileProperties command.
22703
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
    71
PROPCMDLINE := $(subst _SPACE_, $(SPACE), \
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
    72
    $(join $(addprefix -compile_SPACE_, $(PROPSOURCES)), \
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
    73
    $(addsuffix _SPACE_java.util.ListResourceBundle, \
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    74
    $(addprefix _SPACE_, $(PROPJAVAS)))))
14270
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    75
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    76
# Now setup the rule for the generation of the resource bundles.
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    77
$(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props: $(PROPSOURCES) $(BUILD_TOOLS_LANGTOOLS)
17650
67dcfe192818 8012566: Replace find, rm, printf and similar with their proper variables
erikj
parents: 17555
diff changeset
    78
	$(RM) -r $(@D)/*
67dcfe192818 8012566: Replace find, rm, printf and similar with their proper variables
erikj
parents: 17555
diff changeset
    79
	$(MKDIR) -p $(@D) $(PROPDIRS)
22703
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
    80
	$(PRINTF) "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" \
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    81
	    > $(LANGTOOLS_OUTPUTDIR)/gensrc/jdk.compiler/com/sun/tools/javah/resources/version.properties
22703
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
    82
	$(PRINTF) "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" \
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    83
	    > $(LANGTOOLS_OUTPUTDIR)/gensrc/jdk.compiler/com/sun/tools/javap/resources/version.properties
22703
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
    84
	$(PRINTF) "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" \
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    85
	    > $(LANGTOOLS_OUTPUTDIR)/gensrc/jdk.compiler/com/sun/tools/javac/resources/version.properties
22703
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
    86
	$(PRINTF) "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" \
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    87
	    > $(LANGTOOLS_OUTPUTDIR)/gensrc/jdk.dev/com/sun/tools/jdeps/resources/version.properties
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    88
	$(PRINTF) "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" \
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    89
	    > $(LANGTOOLS_OUTPUTDIR)/gensrc/jdk.javadoc/com/sun/tools/javadoc/resources/version.properties
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    90
	$(ECHO) Compiling $(words $(PROPSOURCES) v1 v2 v3) properties into resource bundles
14270
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    91
	$(TOOL_COMPILEPROPS_CMD) $(PROPCMDLINE) \
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    92
	    -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/jdk.compiler/com/sun/tools/javah/resources/version.properties \
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    93
	        $(LANGTOOLS_OUTPUTDIR)/gensrc/jdk.compiler/com/sun/tools/javah/resources/version.java \
20623
cb61ea12e375 8001931: The new build system whitespace cleanup
ihse
parents: 17650
diff changeset
    94
	        java.util.ListResourceBundle \
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    95
	    -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/jdk.compiler/com/sun/tools/javap/resources/version.properties \
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    96
	        $(LANGTOOLS_OUTPUTDIR)/gensrc/jdk.compiler/com/sun/tools/javap/resources/version.java \
20623
cb61ea12e375 8001931: The new build system whitespace cleanup
ihse
parents: 17650
diff changeset
    97
	        java.util.ListResourceBundle \
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    98
	    -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/jdk.compiler/com/sun/tools/javac/resources/version.properties \
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
    99
	        $(LANGTOOLS_OUTPUTDIR)/gensrc/jdk.compiler/com/sun/tools/javac/resources/version.java \
20623
cb61ea12e375 8001931: The new build system whitespace cleanup
ihse
parents: 17650
diff changeset
   100
	        java.util.ListResourceBundle \
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
   101
	    -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/jdk.dev/com/sun/tools/jdeps/resources/version.properties \
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
   102
	        $(LANGTOOLS_OUTPUTDIR)/gensrc/jdk.dev/com/sun/tools/jdeps/resources/version.java \
21888
568c5da9f16b 6726154: javadoc generated with incorrect version in comment
kizune
parents: 21887
diff changeset
   103
	        java.util.ListResourceBundle \
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
   104
	    -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/jdk.javadoc/com/sun/tools/javadoc/resources/version.properties \
83c19f00452c 8054834: Modular Source Code
chegar
parents: 22703
diff changeset
   105
	        $(LANGTOOLS_OUTPUTDIR)/gensrc/jdk.javadoc/com/sun/tools/javadoc/resources/version.java \
20623
cb61ea12e375 8001931: The new build system whitespace cleanup
ihse
parents: 17650
diff changeset
   106
	        java.util.ListResourceBundle
22703
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
   107
	$(TOUCH) $@
14270
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   108
22703
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
   109
all: $(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props
14270
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   110
22703
322d8adeabe1 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 21888
diff changeset
   111
################################################################################