Merge jdk8-b63

Wed, 31 Oct 2012 18:36:25 -0700

author
katleman
date
Wed, 31 Oct 2012 18:36:25 -0700
changeset 1370
92e6f2190ca0
parent 1368
669468143a5e
parent 1369
741cce355ba6
child 1371
26831b6fcc4a

Merge

     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/makefiles/BuildLangtools.gmk	Wed Oct 31 18:36:25 2012 -0700
     1.3 @@ -0,0 +1,205 @@
     1.4 +#
     1.5 +# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
     1.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 +#
     1.8 +# This code is free software; you can redistribute it and/or modify it
     1.9 +# under the terms of the GNU General Public License version 2 only, as
    1.10 +# published by the Free Software Foundation.  Oracle designates this
    1.11 +# particular file as subject to the "Classpath" exception as provided
    1.12 +# by Oracle in the LICENSE file that accompanied this code.
    1.13 +#
    1.14 +# This code is distributed in the hope that it will be useful, but WITHOUT
    1.15 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.16 +# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.17 +# version 2 for more details (a copy is included in the LICENSE file that
    1.18 +# accompanied this code).
    1.19 +#
    1.20 +# You should have received a copy of the GNU General Public License version
    1.21 +# 2 along with this work; if not, write to the Free Software Foundation,
    1.22 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.23 +#
    1.24 +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.25 +# or visit www.oracle.com if you need additional information or have any
    1.26 +# questions.
    1.27 +#
    1.28 +
    1.29 +# This must be the first rule
    1.30 +default: all
    1.31 +
    1.32 +include $(SPEC)
    1.33 +include MakeBase.gmk
    1.34 +include JavaCompilation.gmk
    1.35 +
    1.36 +# The BOOT_JAVAC setup uses the bootdir compiler to compile the tools
    1.37 +# and the bootstrap javac, to be run by the bootdir jvm.
    1.38 +$(eval $(call SetupJavaCompiler,BOOT_JAVAC,\
    1.39 +	JAVAC:=$(JAVAC),\
    1.40 +        SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
    1.41 +        SERVER_JVM:=$(SJAVAC_SERVER_JAVA),\
    1.42 +        FLAGS:=-XDignore.symbol.file=true -g -Xlint:all$(COMMA)-deprecation -Werror))
    1.43 +
    1.44 +# Now setup the compilation of the properties compilation tool. You can depend
    1.45 +# upon $(BUILD_TOOLS) to trigger a compilation of the tools. Note that we
    1.46 +# add src/share/classes to the sourcepath. This is necessary since the GenStubs
    1.47 +# program needs to be linked and run towards the new javac sources.
    1.48 +$(eval $(call SetupJavaCompilation,BUILD_TOOLS,\
    1.49 +		SETUP:=BOOT_JAVAC,\
    1.50 +		DISABLE_SJAVAC:=true,\
    1.51 +                ADD_JAVAC_FLAGS:=-Xprefer:source,\
    1.52 +		SRC:=$(LANGTOOLS_TOPDIR)/make/tools $(LANGTOOLS_TOPDIR)/src/share/classes,\
    1.53 +		INCLUDES:=compileproperties genstubs,\
    1.54 +		BIN:=$(LANGTOOLS_OUTPUTDIR)/btclasses))
    1.55 +
    1.56 +# The compileprops tools compiles a properties file into a resource bundle.
    1.57 +TOOL_COMPILEPROPS_CMD:=$(JAVA) -cp $(LANGTOOLS_OUTPUTDIR)/btclasses compileproperties.CompileProperties -quiet
    1.58 +# Lookup the properties that need to be compiled into resource bundles.
    1.59 +PROPSOURCES:=$(shell find $(LANGTOOLS_TOPDIR)/src/share/classes -name "*.properties")
    1.60 +# Strip away prefix and suffix, leaving for example only: "com/sun/tools/javac/resources/javac_zh_CN"
    1.61 +PROPPATHS:=$(patsubst $(LANGTOOLS_TOPDIR)/src/share/classes/%.properties,%,$(PROPSOURCES))
    1.62 +# Generate the list of java files to be created.
    1.63 +PROPJAVAS:=$(patsubst %,$(LANGTOOLS_OUTPUTDIR)/gensrc/%.java,$(PROPPATHS))
    1.64 +# Generate the package dirs for the tobe generated java files.
    1.65 +PROPDIRS:=$(dir $(PROPJAVAS))
    1.66 +# Now generate a sequence of "-compile ...javac_zh_CN.properties ...javac_zh_CN.java java.util.ListResourceBundle"
    1.67 +# suitable to be fed into the CompileProperties command.
    1.68 +PROPCMDLINE:=$(subst _SPACE_,$(SPACE),$(join $(addprefix -compile_SPACE_,$(PROPSOURCES)), \
    1.69 +		$(addsuffix _SPACE_java.util.ListResourceBundle,$(addprefix _SPACE_$(LANGTOOLS_OUTPUTDIR)/gensrc/,$(addsuffix .java,$(PROPPATHS))))))
    1.70 +
    1.71 +# Now setup the rule for the generation of the resource bundles.
    1.72 +$(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d : $(PROPSOURCES) $(BUILD_TOOLS)
    1.73 +	rm -rf $(@D)/*
    1.74 +	mkdir -p $(@D) $(PROPDIRS)
    1.75 +	printf "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties
    1.76 +	printf "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.properties
    1.77 +	printf "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.properties
    1.78 +	echo Compiling $(words $(PROPSOURCES) v1 v2 v3) properties into resource bundles
    1.79 +	$(TOOL_COMPILEPROPS_CMD) $(PROPCMDLINE) \
    1.80 +		-compile 	$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties \
    1.81 +				$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.java \
    1.82 +				java.util.ListResourceBundle \
    1.83 +		-compile 	$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.properties \
    1.84 +				$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.java \
    1.85 +				java.util.ListResourceBundle \
    1.86 +		-compile	$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.properties \
    1.87 +				$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.java \
    1.88 +				java.util.ListResourceBundle
    1.89 +	echo PROPS_ARE_CREATED=yes > $@
    1.90 +
    1.91 +# Trigger the generation of the resource bundles. After the resource bundles have
    1.92 +# been compiled, then the makefile will restart and the newly created java files
    1.93 +# will become part of the build further along in the makefile.
    1.94 +-include $(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d
    1.95 +
    1.96 +ifeq ($(PROPS_ARE_CREATED),yes)
    1.97 +        # Setup the rules to build a dist/bootstrap/lib/javac.jar, ie a smaller intermediate javac
    1.98 +        # that can be compiled with an old javac. The intermediate javac is then used
    1.99 +        # to compile javac again and to build the complete new jdk.
   1.100 +        $(eval $(call SetupJavaCompilation,BUILD_BOOTSTRAP_LANGTOOLS,\
   1.101 +		SETUP:=BOOT_JAVAC,\
   1.102 +		DISABLE_SJAVAC:=true,\
   1.103 +		SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc,\
   1.104 +		EXCLUDES:=com/sun/tools/javac/nio,\
   1.105 +		BIN:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap))
   1.106 +
   1.107 +        $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAC,$(BUILD_BOOTSTRAP_LANGTOOLS),\
   1.108 +		SRCS:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap,\
   1.109 +		JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar,\
   1.110 +		JARMAIN:=com.sun.tools.javac.Main))
   1.111 +
   1.112 +        $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAH,$(BUILD_BOOTSTRAP_LANGTOOLS),\
   1.113 +		SRCS:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap,\
   1.114 +		JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javah.jar,\
   1.115 +		JARMAIN:=com.sun.tools.javah.Main))
   1.116 +
   1.117 +        $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAP,$(BUILD_BOOTSTRAP_LANGTOOLS),\
   1.118 +		SRCS:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap,\
   1.119 +		JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javap.jar,\
   1.120 +		JARMAIN:=com.sun.tools.javap.Main))
   1.121 +
   1.122 +        $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVADOC,$(BUILD_BOOTSTRAP_LANGTOOLS),\
   1.123 +		SRCS:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap,\
   1.124 +		JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javadoc.jar,\
   1.125 +		JARMAIN:=com.sun.tools.javadoc.Main))
   1.126 +
   1.127 +        # GenStubs is used to bootstrap any dependencies from javac to the new JDK that is not 
   1.128 +        # yet built. It is currently not needed but might be again in the future. The following
   1.129 +        # exercises the functionality to verify that it works.
   1.130 +        TOOL_GENSTUBS_CMD=$(JAVA) \
   1.131 +             "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \
   1.132 +             -classpath $(LANGTOOLS_OUTPUTDIR)/btclasses \
   1.133 +             genstubs.GenStubs
   1.134 +        # We fetch source from the JDK...
   1.135 +        JDKS=$(JDK_TOPDIR)/src/share/classes
   1.136 +        # Build the list of classes to generate stubs from. java/util/Objects.java isn't
   1.137 +        # currently needed, but is used as a demo for now.
   1.138 +	 STUBSOURCES:=$(shell $(FIND) $(JDKS) -name "*.java" | $(GREP) \
   1.139 +		    -e "$(JDKS)/java/util/Objects.java")
   1.140 +        # Rewrite the file names into class names because the GenStubs tool require this.
   1.141 +        STUBCLASSES:=$(subst /,.,$(patsubst $(JDKS)/%.java,%,$(STUBSOURCES)))
   1.142 +
   1.143 +        # Now setup the build recipe for genstubs.
   1.144 +        $(LANGTOOLS_OUTPUTDIR)/genstubs/_the_stubs.d : $(STUBSOURCES) $(BUILD_TOOLS) \
   1.145 +				$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
   1.146 +				$(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d
   1.147 +	       	mkdir -p $(@D)
   1.148 +		mkdir -p $(LANGTOOLS_OUTPUTDIR)/tmpstubs
   1.149 +	       	echo $(LOG_INFO) Generating stubs from JDK sources.
   1.150 +	       	($(TOOL_GENSTUBS_CMD) -s $(LANGTOOLS_OUTPUTDIR)/tmpstubs -sourcepath $(JDKS) $(STUBCLASSES) && echo STUBS_ARE_CREATED=yes > $@)
   1.151 +		if $(DIFF) -x "_the*" -rq $(LANGTOOLS_OUTPUTDIR)/tmpstubs $(LANGTOOLS_OUTPUTDIR)/genstubs > /dev/null 2>&1; then \
   1.152 +			echo $(LOG_INFO) No changes in the stubs!; \
   1.153 +			rm -rf $(LANGTOOLS_OUTPUTDIR)/tmpstubs; \
   1.154 +		else \
   1.155 +			echo $(LOG_INFO) Changes in stubs detected!; \
   1.156 +			rm -rf $(@D); \
   1.157 +			mv $(LANGTOOLS_OUTPUTDIR)/tmpstubs $(@D); \
   1.158 +		fi
   1.159 +		echo STUBS_ARE_CREATED=yes > $@
   1.160 +
   1.161 +        # Trigger a generation of the genstubs java source code and a restart
   1.162 +        # of the makefile to make sure that the following build setup use the 
   1.163 +        # newly created java files.
   1.164 +        -include $(LANGTOOLS_OUTPUTDIR)/genstubs/_the_stubs.d
   1.165 +
   1.166 +	ifeq ($(STUBS_ARE_CREATED),yes)
   1.167 +                # Setup a compiler configuration using the intermediate javac in dist/bootstrap/lib/javac.jar
   1.168 +                # that generates code for the new jdk that is being built.
   1.169 +                # The code compiled by this compiler setup, cannot necessarily be run with the bootstrap jvm.
   1.170 +                $(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE,\
   1.171 +                  JVM:=$(JAVA),\
   1.172 +                  JAVAC:="-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \
   1.173 +			 -jar $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar,\
   1.174 +                  FLAGS:=-XDignore.symbol.file=true -Xlint:all$(COMMA)-deprecation -Werror,\
   1.175 +                  SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
   1.176 +                  SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
   1.177 +
   1.178 +                # javax.tools.JavaCompilerTool isn't really a suffix but this gets the file copied.
   1.179 +		RESOURCE_SUFFIXES:=.gif .xml .css javax.tools.JavaCompilerTool
   1.180 +
   1.181 +                $(eval $(call SetupJavaCompilation,BUILD_FULL_JAVAC,\
   1.182 +			SETUP:=GENERATE_NEWBYTECODE,\
   1.183 +			SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc \
   1.184 +			     $(LANGTOOLS_OUTPUTDIR)/genstubs,\
   1.185 +			EXCLUDES:=java/util java/io java/nio,\
   1.186 +			COPY:=$(RESOURCE_SUFFIXES),\
   1.187 +			BIN:=$(LANGTOOLS_OUTPUTDIR)/classes))
   1.188 +
   1.189 +                $(eval $(call SetupArchive,ARCHIVE_FULL_JAVAC,$(BUILD_FULL_JAVAC),\
   1.190 +			SETUP:=GENERATE_NEWBYTECODE,\
   1.191 +			SRCS:=$(LANGTOOLS_OUTPUTDIR)/classes,\
   1.192 +			SUFFIXES:=.class $(RESOURCE_SUFFIXES),\
   1.193 +			JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/lib/classes.jar))
   1.194 +
   1.195 +                $(eval $(call SetupZipArchive,ZIP_FULL_JAVAC_SOURCE,\
   1.196 +			SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc,\
   1.197 +			ZIP:=$(LANGTOOLS_OUTPUTDIR)/dist/lib/src.zip))
   1.198 +
   1.199 +                all: 		$(LANGTOOLS_OUTPUTDIR)/dist/lib/classes.jar \
   1.200 +				$(LANGTOOLS_OUTPUTDIR)/dist/lib/src.zip \
   1.201 +	                 	$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
   1.202 +				$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javah.jar \
   1.203 +				$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javap.jar \
   1.204 +				$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javadoc.jar
   1.205 +
   1.206 +
   1.207 +        endif
   1.208 +endif
     2.1 --- a/makefiles/Makefile	Thu Oct 25 20:33:49 2012 -0700
     2.2 +++ b/makefiles/Makefile	Wed Oct 31 18:36:25 2012 -0700
     2.3 @@ -1,5 +1,5 @@
     2.4  #
     2.5 -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
     2.6 +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
     2.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     2.8  #
     2.9  # This code is free software; you can redistribute it and/or modify it
    2.10 @@ -23,183 +23,27 @@
    2.11  # questions.
    2.12  #
    2.13  
    2.14 -# This must be the first rule
    2.15 -default: all
    2.16 +# Locate this Makefile
    2.17 +ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
    2.18 +    makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
    2.19 +else
    2.20 +    makefile_path:=$(lastword $(MAKEFILE_LIST))
    2.21 +endif
    2.22 +repo_dir:=$(patsubst %/makefiles/Makefile,%,$(makefile_path))
    2.23  
    2.24 -include $(SPEC)
    2.25 -include MakeBase.gmk
    2.26 -include JavaCompilation.gmk
    2.27 +# What is the name of this subsystem (langtools, corba, etc)?
    2.28 +subsystem_name:=$(notdir $(repo_dir))
    2.29  
    2.30 -# The BOOT_JAVAC setup uses the bootdir compiler to compile the tools
    2.31 -# and the bootstrap javac, to be run by the bootdir jvm.
    2.32 -$(eval $(call SetupJavaCompiler,BOOT_JAVAC,\
    2.33 -	JAVAC:=$(JAVAC),\
    2.34 -        SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
    2.35 -        SERVER_JVM:=$(SJAVAC_SERVER_JAVA),\
    2.36 -        FLAGS:=-XDignore.symbol.file=true -g -Xlint:all$(COMMA)-deprecation -Werror))
    2.37 +# Try to locate top-level makefile
    2.38 +top_level_makefile:=$(repo_dir)/../common/makefiles/Makefile
    2.39 +ifneq ($(wildcard $(top_level_makefile)),)
    2.40 +  $(info Will run $(subsystem_name) target on top-level Makefile)
    2.41 +  $(info WARNING: This is a non-recommended way of building!)
    2.42 +  $(info ===================================================)
    2.43 +else
    2.44 +  $(info Cannot locate top-level Makefile. Is this repo not checked out as part of a complete forest?)
    2.45 +  $(error Build from top-level Makefile instead)
    2.46 +endif
    2.47  
    2.48 -# Now setup the compilation of the properties compilation tool. You can depend
    2.49 -# upon $(BUILD_TOOLS) to trigger a compilation of the tools. Note that we
    2.50 -# add src/share/classes to the sourcepath. This is necessary since the GenStubs
    2.51 -# program needs to be linked and run towards the new javac sources.
    2.52 -$(eval $(call SetupJavaCompilation,BUILD_TOOLS,\
    2.53 -		SETUP:=BOOT_JAVAC,\
    2.54 -		DISABLE_SJAVAC:=true,\
    2.55 -                ADD_JAVAC_FLAGS:=-Xprefer:source,\
    2.56 -		SRC:=$(LANGTOOLS_TOPDIR)/make/tools $(LANGTOOLS_TOPDIR)/src/share/classes,\
    2.57 -		INCLUDES:=compileproperties genstubs,\
    2.58 -		BIN:=$(LANGTOOLS_OUTPUTDIR)/btclasses))
    2.59 -
    2.60 -# The compileprops tools compiles a properties file into a resource bundle.
    2.61 -TOOL_COMPILEPROPS_CMD:=$(JAVA) -cp $(LANGTOOLS_OUTPUTDIR)/btclasses compileproperties.CompileProperties -quiet
    2.62 -# Lookup the properties that need to be compiled into resource bundles.
    2.63 -PROPSOURCES:=$(shell find $(LANGTOOLS_TOPDIR)/src/share/classes -name "*.properties")
    2.64 -# Strip away prefix and suffix, leaving for example only: "com/sun/tools/javac/resources/javac_zh_CN"
    2.65 -PROPPATHS:=$(patsubst $(LANGTOOLS_TOPDIR)/src/share/classes/%.properties,%,$(PROPSOURCES))
    2.66 -# Generate the list of java files to be created.
    2.67 -PROPJAVAS:=$(patsubst %,$(LANGTOOLS_OUTPUTDIR)/gensrc/%.java,$(PROPPATHS))
    2.68 -# Generate the package dirs for the tobe generated java files.
    2.69 -PROPDIRS:=$(dir $(PROPJAVAS))
    2.70 -# Now generate a sequence of "-compile ...javac_zh_CN.properties ...javac_zh_CN.java java.util.ListResourceBundle"
    2.71 -# suitable to be fed into the CompileProperties command.
    2.72 -PROPCMDLINE:=$(subst _SPACE_,$(SPACE),$(join $(addprefix -compile_SPACE_,$(PROPSOURCES)), \
    2.73 -		$(addsuffix _SPACE_java.util.ListResourceBundle,$(addprefix _SPACE_$(LANGTOOLS_OUTPUTDIR)/gensrc/,$(addsuffix .java,$(PROPPATHS))))))
    2.74 -
    2.75 -# Now setup the rule for the generation of the resource bundles.
    2.76 -$(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d : $(PROPSOURCES) $(BUILD_TOOLS)
    2.77 -	rm -rf $(@D)/*
    2.78 -	mkdir -p $(@D) $(PROPDIRS)
    2.79 -	printf "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties
    2.80 -	printf "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.properties
    2.81 -	printf "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.properties
    2.82 -	echo Compiling $(words $(PROPSOURCES) v1 v2 v3) properties into resource bundles
    2.83 -	$(TOOL_COMPILEPROPS_CMD) $(PROPCMDLINE) \
    2.84 -		-compile 	$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties \
    2.85 -				$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.java \
    2.86 -				java.util.ListResourceBundle \
    2.87 -		-compile 	$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.properties \
    2.88 -				$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.java \
    2.89 -				java.util.ListResourceBundle \
    2.90 -		-compile	$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.properties \
    2.91 -				$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.java \
    2.92 -				java.util.ListResourceBundle
    2.93 -	echo PROPS_ARE_CREATED=yes > $@
    2.94 -
    2.95 -# Trigger the generation of the resource bundles. After the resource bundles have
    2.96 -# been compiled, then the makefile will restart and the newly created java files
    2.97 -# will become part of the build further along in the makefile.
    2.98 --include $(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d
    2.99 -
   2.100 -ifeq ($(PROPS_ARE_CREATED),yes)
   2.101 -        # Setup the rules to build a dist/bootstrap/lib/javac.jar, ie a smaller intermediate javac
   2.102 -        # that can be compiled with an old javac. The intermediate javac is then used
   2.103 -        # to compile javac again and to build the complete new jdk.
   2.104 -        $(eval $(call SetupJavaCompilation,BUILD_BOOTSTRAP_LANGTOOLS,\
   2.105 -		SETUP:=BOOT_JAVAC,\
   2.106 -		DISABLE_SJAVAC:=true,\
   2.107 -		SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc,\
   2.108 -		EXCLUDES:=com/sun/tools/javac/nio,\
   2.109 -		BIN:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap))
   2.110 -
   2.111 -        $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAC,$(BUILD_BOOTSTRAP_LANGTOOLS),\
   2.112 -		SRCS:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap,\
   2.113 -		JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar,\
   2.114 -		JARMAIN:=com.sun.tools.javac.Main))
   2.115 -
   2.116 -        $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAH,$(BUILD_BOOTSTRAP_LANGTOOLS),\
   2.117 -		SRCS:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap,\
   2.118 -		JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javah.jar,\
   2.119 -		JARMAIN:=com.sun.tools.javah.Main))
   2.120 -
   2.121 -        $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAP,$(BUILD_BOOTSTRAP_LANGTOOLS),\
   2.122 -		SRCS:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap,\
   2.123 -		JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javap.jar,\
   2.124 -		JARMAIN:=com.sun.tools.javap.Main))
   2.125 -
   2.126 -        $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVADOC,$(BUILD_BOOTSTRAP_LANGTOOLS),\
   2.127 -		SRCS:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap,\
   2.128 -		JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javadoc.jar,\
   2.129 -		JARMAIN:=com.sun.tools.javadoc.Main))
   2.130 -
   2.131 -        # GenStubs is used to bootstrap any dependencies from javac to the new JDK that is not 
   2.132 -        # yet built. It is currently not needed but might be again in the future. The following
   2.133 -        # exercises the functionality to verify that it works.
   2.134 -        TOOL_GENSTUBS_CMD=$(JAVA) \
   2.135 -             "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \
   2.136 -             -classpath $(LANGTOOLS_OUTPUTDIR)/btclasses \
   2.137 -             genstubs.GenStubs
   2.138 -        # We fetch source from the JDK...
   2.139 -        JDKS=$(JDK_TOPDIR)/src/share/classes
   2.140 -        # Build the list of classes to generate stubs from. java/util/Objects.java isn't
   2.141 -        # currently needed, but is used as a demo for now.
   2.142 -	 STUBSOURCES:=$(shell $(FIND) $(JDKS) -name "*.java" | $(GREP) \
   2.143 -		    -e "$(JDKS)/java/util/Objects.java")
   2.144 -        # Rewrite the file names into class names because the GenStubs tool require this.
   2.145 -        STUBCLASSES:=$(subst /,.,$(patsubst $(JDKS)/%.java,%,$(STUBSOURCES)))
   2.146 -
   2.147 -        # Now setup the build recipe for genstubs.
   2.148 -        $(LANGTOOLS_OUTPUTDIR)/genstubs/_the_stubs.d : $(STUBSOURCES) $(BUILD_TOOLS) \
   2.149 -				$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
   2.150 -				$(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d
   2.151 -	       	mkdir -p $(@D)
   2.152 -		mkdir -p $(LANGTOOLS_OUTPUTDIR)/tmpstubs
   2.153 -	       	echo Generating stubs from JDK sources.
   2.154 -	       	($(TOOL_GENSTUBS_CMD) -s $(LANGTOOLS_OUTPUTDIR)/tmpstubs -sourcepath $(JDKS) $(STUBCLASSES) && echo STUBS_ARE_CREATED=yes > $@)
   2.155 -		if $(DIFF) -x "_the*" -rq $(LANGTOOLS_OUTPUTDIR)/tmpstubs $(LANGTOOLS_OUTPUTDIR)/genstubs > /dev/null 2>&1; then \
   2.156 -			echo No changes in the stubs!; \
   2.157 -			rm -rf $(LANGTOOLS_OUTPUTDIR)/tmpstubs; \
   2.158 -		else \
   2.159 -			echo Changes in stubs detected!; \
   2.160 -			rm -rf $(@D); \
   2.161 -			mv $(LANGTOOLS_OUTPUTDIR)/tmpstubs $(@D); \
   2.162 -		fi
   2.163 -		echo STUBS_ARE_CREATED=yes > $@
   2.164 -
   2.165 -        # Trigger a generation of the genstubs java source code and a restart
   2.166 -        # of the makefile to make sure that the following build setup use the 
   2.167 -        # newly created java files.
   2.168 -        -include $(LANGTOOLS_OUTPUTDIR)/genstubs/_the_stubs.d
   2.169 -
   2.170 -	ifeq ($(STUBS_ARE_CREATED),yes)
   2.171 -                # Setup a compiler configuration using the intermediate javac in dist/bootstrap/lib/javac.jar
   2.172 -                # that generates code for the new jdk that is being built.
   2.173 -                # The code compiled by this compiler setup, cannot necessarily be run with the bootstrap jvm.
   2.174 -                $(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE,\
   2.175 -                  JVM:=$(JAVA),\
   2.176 -                  JAVAC:="-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \
   2.177 -			 -jar $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar,\
   2.178 -                  FLAGS:=-XDignore.symbol.file=true -Xlint:all$(COMMA)-deprecation -Werror,\
   2.179 -                  SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
   2.180 -                  SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
   2.181 -
   2.182 -                # javax.tools.JavaCompilerTool isn't really a suffix but this gets the file copied.
   2.183 -		RESOURCE_SUFFIXES:=.gif .xml .css javax.tools.JavaCompilerTool
   2.184 -
   2.185 -                $(eval $(call SetupJavaCompilation,BUILD_FULL_JAVAC,\
   2.186 -			SETUP:=GENERATE_NEWBYTECODE,\
   2.187 -			SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc \
   2.188 -			     $(LANGTOOLS_OUTPUTDIR)/genstubs,\
   2.189 -			EXCLUDES:=java/util java/io java/nio,\
   2.190 -			COPY:=$(RESOURCE_SUFFIXES),\
   2.191 -			BIN:=$(LANGTOOLS_OUTPUTDIR)/classes))
   2.192 -
   2.193 -                $(eval $(call SetupArchive,ARCHIVE_FULL_JAVAC,$(BUILD_FULL_JAVAC),\
   2.194 -			SETUP:=GENERATE_NEWBYTECODE,\
   2.195 -			SRCS:=$(LANGTOOLS_OUTPUTDIR)/classes,\
   2.196 -			SUFFIXES:=.class $(RESOURCE_SUFFIXES),\
   2.197 -			JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/lib/classes.jar))
   2.198 -
   2.199 -                $(eval $(call SetupZipArchive,ZIP_FULL_JAVAC_SOURCE,\
   2.200 -			SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc,\
   2.201 -			ZIP:=$(LANGTOOLS_OUTPUTDIR)/dist/lib/src.zip))
   2.202 -
   2.203 -                all: 		$(LANGTOOLS_OUTPUTDIR)/dist/lib/classes.jar \
   2.204 -				$(LANGTOOLS_OUTPUTDIR)/dist/lib/src.zip \
   2.205 -	                 	$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
   2.206 -				$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javah.jar \
   2.207 -				$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javap.jar \
   2.208 -				$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javadoc.jar
   2.209 -
   2.210 -
   2.211 -        endif
   2.212 -endif
   2.213 +all:
   2.214 +	@$(MAKE) -f $(top_level_makefile) $(subsystem_name)

mercurial