Tue, 06 Nov 2012 18:41:56 -0800
Merge
1.1 --- a/.hgtags Tue Nov 06 17:22:29 2012 -0800 1.2 +++ b/.hgtags Tue Nov 06 18:41:56 2012 -0800 1.3 @@ -184,3 +184,4 @@ 1.4 3d2b98ffcb534b0e5be87bb1f9f68d1518ad7729 jdk8-b60 1.5 26020b247ad3806dbca33e029ee12e1b191f59f9 jdk8-b61 1.6 b47bb81ba962ef80bb6f0b863c33a0afcfb0b49e jdk8-b62 1.7 +92e6f2190ca0567c857f85c3fb7a2be5adf079d0 jdk8-b63
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/makefiles/BuildLangtools.gmk Tue Nov 06 18:41:56 2012 -0800 2.3 @@ -0,0 +1,205 @@ 2.4 +# 2.5 +# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 2.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2.7 +# 2.8 +# This code is free software; you can redistribute it and/or modify it 2.9 +# under the terms of the GNU General Public License version 2 only, as 2.10 +# published by the Free Software Foundation. Oracle designates this 2.11 +# particular file as subject to the "Classpath" exception as provided 2.12 +# by Oracle in the LICENSE file that accompanied this code. 2.13 +# 2.14 +# This code is distributed in the hope that it will be useful, but WITHOUT 2.15 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 2.16 +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 2.17 +# version 2 for more details (a copy is included in the LICENSE file that 2.18 +# accompanied this code). 2.19 +# 2.20 +# You should have received a copy of the GNU General Public License version 2.21 +# 2 along with this work; if not, write to the Free Software Foundation, 2.22 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2.23 +# 2.24 +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2.25 +# or visit www.oracle.com if you need additional information or have any 2.26 +# questions. 2.27 +# 2.28 + 2.29 +# This must be the first rule 2.30 +default: all 2.31 + 2.32 +include $(SPEC) 2.33 +include MakeBase.gmk 2.34 +include JavaCompilation.gmk 2.35 + 2.36 +# The BOOT_JAVAC setup uses the bootdir compiler to compile the tools 2.37 +# and the bootstrap javac, to be run by the bootdir jvm. 2.38 +$(eval $(call SetupJavaCompiler,BOOT_JAVAC,\ 2.39 + JAVAC:=$(JAVAC),\ 2.40 + SERVER_DIR:=$(SJAVAC_SERVER_DIR),\ 2.41 + SERVER_JVM:=$(SJAVAC_SERVER_JAVA),\ 2.42 + FLAGS:=-XDignore.symbol.file=true -g -Xlint:all$(COMMA)-deprecation -Werror)) 2.43 + 2.44 +# Now setup the compilation of the properties compilation tool. You can depend 2.45 +# upon $(BUILD_TOOLS) to trigger a compilation of the tools. Note that we 2.46 +# add src/share/classes to the sourcepath. This is necessary since the GenStubs 2.47 +# program needs to be linked and run towards the new javac sources. 2.48 +$(eval $(call SetupJavaCompilation,BUILD_TOOLS,\ 2.49 + SETUP:=BOOT_JAVAC,\ 2.50 + DISABLE_SJAVAC:=true,\ 2.51 + ADD_JAVAC_FLAGS:=-Xprefer:source,\ 2.52 + SRC:=$(LANGTOOLS_TOPDIR)/make/tools $(LANGTOOLS_TOPDIR)/src/share/classes,\ 2.53 + INCLUDES:=compileproperties genstubs,\ 2.54 + BIN:=$(LANGTOOLS_OUTPUTDIR)/btclasses)) 2.55 + 2.56 +# The compileprops tools compiles a properties file into a resource bundle. 2.57 +TOOL_COMPILEPROPS_CMD:=$(JAVA) -cp $(LANGTOOLS_OUTPUTDIR)/btclasses compileproperties.CompileProperties -quiet 2.58 +# Lookup the properties that need to be compiled into resource bundles. 2.59 +PROPSOURCES:=$(shell find $(LANGTOOLS_TOPDIR)/src/share/classes -name "*.properties") 2.60 +# Strip away prefix and suffix, leaving for example only: "com/sun/tools/javac/resources/javac_zh_CN" 2.61 +PROPPATHS:=$(patsubst $(LANGTOOLS_TOPDIR)/src/share/classes/%.properties,%,$(PROPSOURCES)) 2.62 +# Generate the list of java files to be created. 2.63 +PROPJAVAS:=$(patsubst %,$(LANGTOOLS_OUTPUTDIR)/gensrc/%.java,$(PROPPATHS)) 2.64 +# Generate the package dirs for the tobe generated java files. 2.65 +PROPDIRS:=$(dir $(PROPJAVAS)) 2.66 +# Now generate a sequence of "-compile ...javac_zh_CN.properties ...javac_zh_CN.java java.util.ListResourceBundle" 2.67 +# suitable to be fed into the CompileProperties command. 2.68 +PROPCMDLINE:=$(subst _SPACE_,$(SPACE),$(join $(addprefix -compile_SPACE_,$(PROPSOURCES)), \ 2.69 + $(addsuffix _SPACE_java.util.ListResourceBundle,$(addprefix _SPACE_$(LANGTOOLS_OUTPUTDIR)/gensrc/,$(addsuffix .java,$(PROPPATHS)))))) 2.70 + 2.71 +# Now setup the rule for the generation of the resource bundles. 2.72 +$(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d : $(PROPSOURCES) $(BUILD_TOOLS) 2.73 + rm -rf $(@D)/* 2.74 + mkdir -p $(@D) $(PROPDIRS) 2.75 + printf "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties 2.76 + printf "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.properties 2.77 + printf "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.properties 2.78 + echo Compiling $(words $(PROPSOURCES) v1 v2 v3) properties into resource bundles 2.79 + $(TOOL_COMPILEPROPS_CMD) $(PROPCMDLINE) \ 2.80 + -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties \ 2.81 + $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.java \ 2.82 + java.util.ListResourceBundle \ 2.83 + -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.properties \ 2.84 + $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.java \ 2.85 + java.util.ListResourceBundle \ 2.86 + -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.properties \ 2.87 + $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.java \ 2.88 + java.util.ListResourceBundle 2.89 + echo PROPS_ARE_CREATED=yes > $@ 2.90 + 2.91 +# Trigger the generation of the resource bundles. After the resource bundles have 2.92 +# been compiled, then the makefile will restart and the newly created java files 2.93 +# will become part of the build further along in the makefile. 2.94 +-include $(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d 2.95 + 2.96 +ifeq ($(PROPS_ARE_CREATED),yes) 2.97 + # Setup the rules to build a dist/bootstrap/lib/javac.jar, ie a smaller intermediate javac 2.98 + # that can be compiled with an old javac. The intermediate javac is then used 2.99 + # to compile javac again and to build the complete new jdk. 2.100 + $(eval $(call SetupJavaCompilation,BUILD_BOOTSTRAP_LANGTOOLS,\ 2.101 + SETUP:=BOOT_JAVAC,\ 2.102 + DISABLE_SJAVAC:=true,\ 2.103 + SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc,\ 2.104 + EXCLUDES:=com/sun/tools/javac/nio,\ 2.105 + BIN:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap)) 2.106 + 2.107 + $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAC,$(BUILD_BOOTSTRAP_LANGTOOLS),\ 2.108 + SRCS:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap,\ 2.109 + JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar,\ 2.110 + JARMAIN:=com.sun.tools.javac.Main)) 2.111 + 2.112 + $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAH,$(BUILD_BOOTSTRAP_LANGTOOLS),\ 2.113 + SRCS:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap,\ 2.114 + JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javah.jar,\ 2.115 + JARMAIN:=com.sun.tools.javah.Main)) 2.116 + 2.117 + $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAP,$(BUILD_BOOTSTRAP_LANGTOOLS),\ 2.118 + SRCS:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap,\ 2.119 + JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javap.jar,\ 2.120 + JARMAIN:=com.sun.tools.javap.Main)) 2.121 + 2.122 + $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVADOC,$(BUILD_BOOTSTRAP_LANGTOOLS),\ 2.123 + SRCS:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap,\ 2.124 + JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javadoc.jar,\ 2.125 + JARMAIN:=com.sun.tools.javadoc.Main)) 2.126 + 2.127 + # GenStubs is used to bootstrap any dependencies from javac to the new JDK that is not 2.128 + # yet built. It is currently not needed but might be again in the future. The following 2.129 + # exercises the functionality to verify that it works. 2.130 + TOOL_GENSTUBS_CMD=$(JAVA) \ 2.131 + "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \ 2.132 + -classpath $(LANGTOOLS_OUTPUTDIR)/btclasses \ 2.133 + genstubs.GenStubs 2.134 + # We fetch source from the JDK... 2.135 + JDKS=$(JDK_TOPDIR)/src/share/classes 2.136 + # Build the list of classes to generate stubs from. java/util/Objects.java isn't 2.137 + # currently needed, but is used as a demo for now. 2.138 + STUBSOURCES:=$(shell $(FIND) $(JDKS) -name "*.java" | $(GREP) \ 2.139 + -e "$(JDKS)/java/util/Objects.java") 2.140 + # Rewrite the file names into class names because the GenStubs tool require this. 2.141 + STUBCLASSES:=$(subst /,.,$(patsubst $(JDKS)/%.java,%,$(STUBSOURCES))) 2.142 + 2.143 + # Now setup the build recipe for genstubs. 2.144 + $(LANGTOOLS_OUTPUTDIR)/genstubs/_the_stubs.d : $(STUBSOURCES) $(BUILD_TOOLS) \ 2.145 + $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \ 2.146 + $(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d 2.147 + mkdir -p $(@D) 2.148 + mkdir -p $(LANGTOOLS_OUTPUTDIR)/tmpstubs 2.149 + echo $(LOG_INFO) Generating stubs from JDK sources. 2.150 + ($(TOOL_GENSTUBS_CMD) -s $(LANGTOOLS_OUTPUTDIR)/tmpstubs -sourcepath $(JDKS) $(STUBCLASSES) && echo STUBS_ARE_CREATED=yes > $@) 2.151 + if $(DIFF) -x "_the*" -rq $(LANGTOOLS_OUTPUTDIR)/tmpstubs $(LANGTOOLS_OUTPUTDIR)/genstubs > /dev/null 2>&1; then \ 2.152 + echo $(LOG_INFO) No changes in the stubs!; \ 2.153 + rm -rf $(LANGTOOLS_OUTPUTDIR)/tmpstubs; \ 2.154 + else \ 2.155 + echo $(LOG_INFO) Changes in stubs detected!; \ 2.156 + rm -rf $(@D); \ 2.157 + mv $(LANGTOOLS_OUTPUTDIR)/tmpstubs $(@D); \ 2.158 + fi 2.159 + echo STUBS_ARE_CREATED=yes > $@ 2.160 + 2.161 + # Trigger a generation of the genstubs java source code and a restart 2.162 + # of the makefile to make sure that the following build setup use the 2.163 + # newly created java files. 2.164 + -include $(LANGTOOLS_OUTPUTDIR)/genstubs/_the_stubs.d 2.165 + 2.166 + ifeq ($(STUBS_ARE_CREATED),yes) 2.167 + # Setup a compiler configuration using the intermediate javac in dist/bootstrap/lib/javac.jar 2.168 + # that generates code for the new jdk that is being built. 2.169 + # The code compiled by this compiler setup, cannot necessarily be run with the bootstrap jvm. 2.170 + $(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE,\ 2.171 + JVM:=$(JAVA),\ 2.172 + JAVAC:="-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \ 2.173 + -jar $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar,\ 2.174 + FLAGS:=-XDignore.symbol.file=true -Xlint:all$(COMMA)-deprecation -Werror,\ 2.175 + SERVER_DIR:=$(SJAVAC_SERVER_DIR),\ 2.176 + SERVER_JVM:=$(SJAVAC_SERVER_JAVA))) 2.177 + 2.178 + # javax.tools.JavaCompilerTool isn't really a suffix but this gets the file copied. 2.179 + RESOURCE_SUFFIXES:=.gif .xml .css javax.tools.JavaCompilerTool 2.180 + 2.181 + $(eval $(call SetupJavaCompilation,BUILD_FULL_JAVAC,\ 2.182 + SETUP:=GENERATE_NEWBYTECODE,\ 2.183 + SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc \ 2.184 + $(LANGTOOLS_OUTPUTDIR)/genstubs,\ 2.185 + EXCLUDES:=java/util java/io java/nio,\ 2.186 + COPY:=$(RESOURCE_SUFFIXES),\ 2.187 + BIN:=$(LANGTOOLS_OUTPUTDIR)/classes)) 2.188 + 2.189 + $(eval $(call SetupArchive,ARCHIVE_FULL_JAVAC,$(BUILD_FULL_JAVAC),\ 2.190 + SETUP:=GENERATE_NEWBYTECODE,\ 2.191 + SRCS:=$(LANGTOOLS_OUTPUTDIR)/classes,\ 2.192 + SUFFIXES:=.class $(RESOURCE_SUFFIXES),\ 2.193 + JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/lib/classes.jar)) 2.194 + 2.195 + $(eval $(call SetupZipArchive,ZIP_FULL_JAVAC_SOURCE,\ 2.196 + SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc,\ 2.197 + ZIP:=$(LANGTOOLS_OUTPUTDIR)/dist/lib/src.zip)) 2.198 + 2.199 + all: $(LANGTOOLS_OUTPUTDIR)/dist/lib/classes.jar \ 2.200 + $(LANGTOOLS_OUTPUTDIR)/dist/lib/src.zip \ 2.201 + $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \ 2.202 + $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javah.jar \ 2.203 + $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javap.jar \ 2.204 + $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javadoc.jar 2.205 + 2.206 + 2.207 + endif 2.208 +endif
3.1 --- a/makefiles/Makefile Tue Nov 06 17:22:29 2012 -0800 3.2 +++ b/makefiles/Makefile Tue Nov 06 18:41:56 2012 -0800 3.3 @@ -1,5 +1,5 @@ 3.4 # 3.5 -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3.6 +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 3.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3.8 # 3.9 # This code is free software; you can redistribute it and/or modify it 3.10 @@ -23,183 +23,27 @@ 3.11 # questions. 3.12 # 3.13 3.14 -# This must be the first rule 3.15 -default: all 3.16 +# Locate this Makefile 3.17 +ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),) 3.18 + makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST)) 3.19 +else 3.20 + makefile_path:=$(lastword $(MAKEFILE_LIST)) 3.21 +endif 3.22 +repo_dir:=$(patsubst %/makefiles/Makefile,%,$(makefile_path)) 3.23 3.24 -include $(SPEC) 3.25 -include MakeBase.gmk 3.26 -include JavaCompilation.gmk 3.27 +# What is the name of this subsystem (langtools, corba, etc)? 3.28 +subsystem_name:=$(notdir $(repo_dir)) 3.29 3.30 -# The BOOT_JAVAC setup uses the bootdir compiler to compile the tools 3.31 -# and the bootstrap javac, to be run by the bootdir jvm. 3.32 -$(eval $(call SetupJavaCompiler,BOOT_JAVAC,\ 3.33 - JAVAC:=$(JAVAC),\ 3.34 - SERVER_DIR:=$(SJAVAC_SERVER_DIR),\ 3.35 - SERVER_JVM:=$(SJAVAC_SERVER_JAVA),\ 3.36 - FLAGS:=-XDignore.symbol.file=true -g -Xlint:all$(COMMA)-deprecation -Werror)) 3.37 +# Try to locate top-level makefile 3.38 +top_level_makefile:=$(repo_dir)/../common/makefiles/Makefile 3.39 +ifneq ($(wildcard $(top_level_makefile)),) 3.40 + $(info Will run $(subsystem_name) target on top-level Makefile) 3.41 + $(info WARNING: This is a non-recommended way of building!) 3.42 + $(info ===================================================) 3.43 +else 3.44 + $(info Cannot locate top-level Makefile. Is this repo not checked out as part of a complete forest?) 3.45 + $(error Build from top-level Makefile instead) 3.46 +endif 3.47 3.48 -# Now setup the compilation of the properties compilation tool. You can depend 3.49 -# upon $(BUILD_TOOLS) to trigger a compilation of the tools. Note that we 3.50 -# add src/share/classes to the sourcepath. This is necessary since the GenStubs 3.51 -# program needs to be linked and run towards the new javac sources. 3.52 -$(eval $(call SetupJavaCompilation,BUILD_TOOLS,\ 3.53 - SETUP:=BOOT_JAVAC,\ 3.54 - DISABLE_SJAVAC:=true,\ 3.55 - ADD_JAVAC_FLAGS:=-Xprefer:source,\ 3.56 - SRC:=$(LANGTOOLS_TOPDIR)/make/tools $(LANGTOOLS_TOPDIR)/src/share/classes,\ 3.57 - INCLUDES:=compileproperties genstubs,\ 3.58 - BIN:=$(LANGTOOLS_OUTPUTDIR)/btclasses)) 3.59 - 3.60 -# The compileprops tools compiles a properties file into a resource bundle. 3.61 -TOOL_COMPILEPROPS_CMD:=$(JAVA) -cp $(LANGTOOLS_OUTPUTDIR)/btclasses compileproperties.CompileProperties -quiet 3.62 -# Lookup the properties that need to be compiled into resource bundles. 3.63 -PROPSOURCES:=$(shell find $(LANGTOOLS_TOPDIR)/src/share/classes -name "*.properties") 3.64 -# Strip away prefix and suffix, leaving for example only: "com/sun/tools/javac/resources/javac_zh_CN" 3.65 -PROPPATHS:=$(patsubst $(LANGTOOLS_TOPDIR)/src/share/classes/%.properties,%,$(PROPSOURCES)) 3.66 -# Generate the list of java files to be created. 3.67 -PROPJAVAS:=$(patsubst %,$(LANGTOOLS_OUTPUTDIR)/gensrc/%.java,$(PROPPATHS)) 3.68 -# Generate the package dirs for the tobe generated java files. 3.69 -PROPDIRS:=$(dir $(PROPJAVAS)) 3.70 -# Now generate a sequence of "-compile ...javac_zh_CN.properties ...javac_zh_CN.java java.util.ListResourceBundle" 3.71 -# suitable to be fed into the CompileProperties command. 3.72 -PROPCMDLINE:=$(subst _SPACE_,$(SPACE),$(join $(addprefix -compile_SPACE_,$(PROPSOURCES)), \ 3.73 - $(addsuffix _SPACE_java.util.ListResourceBundle,$(addprefix _SPACE_$(LANGTOOLS_OUTPUTDIR)/gensrc/,$(addsuffix .java,$(PROPPATHS)))))) 3.74 - 3.75 -# Now setup the rule for the generation of the resource bundles. 3.76 -$(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d : $(PROPSOURCES) $(BUILD_TOOLS) 3.77 - rm -rf $(@D)/* 3.78 - mkdir -p $(@D) $(PROPDIRS) 3.79 - printf "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties 3.80 - printf "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.properties 3.81 - printf "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.properties 3.82 - echo Compiling $(words $(PROPSOURCES) v1 v2 v3) properties into resource bundles 3.83 - $(TOOL_COMPILEPROPS_CMD) $(PROPCMDLINE) \ 3.84 - -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties \ 3.85 - $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.java \ 3.86 - java.util.ListResourceBundle \ 3.87 - -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.properties \ 3.88 - $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.java \ 3.89 - java.util.ListResourceBundle \ 3.90 - -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.properties \ 3.91 - $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.java \ 3.92 - java.util.ListResourceBundle 3.93 - echo PROPS_ARE_CREATED=yes > $@ 3.94 - 3.95 -# Trigger the generation of the resource bundles. After the resource bundles have 3.96 -# been compiled, then the makefile will restart and the newly created java files 3.97 -# will become part of the build further along in the makefile. 3.98 --include $(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d 3.99 - 3.100 -ifeq ($(PROPS_ARE_CREATED),yes) 3.101 - # Setup the rules to build a dist/bootstrap/lib/javac.jar, ie a smaller intermediate javac 3.102 - # that can be compiled with an old javac. The intermediate javac is then used 3.103 - # to compile javac again and to build the complete new jdk. 3.104 - $(eval $(call SetupJavaCompilation,BUILD_BOOTSTRAP_LANGTOOLS,\ 3.105 - SETUP:=BOOT_JAVAC,\ 3.106 - DISABLE_SJAVAC:=true,\ 3.107 - SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc,\ 3.108 - EXCLUDES:=com/sun/tools/javac/nio,\ 3.109 - BIN:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap)) 3.110 - 3.111 - $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAC,$(BUILD_BOOTSTRAP_LANGTOOLS),\ 3.112 - SRCS:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap,\ 3.113 - JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar,\ 3.114 - JARMAIN:=com.sun.tools.javac.Main)) 3.115 - 3.116 - $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAH,$(BUILD_BOOTSTRAP_LANGTOOLS),\ 3.117 - SRCS:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap,\ 3.118 - JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javah.jar,\ 3.119 - JARMAIN:=com.sun.tools.javah.Main)) 3.120 - 3.121 - $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAP,$(BUILD_BOOTSTRAP_LANGTOOLS),\ 3.122 - SRCS:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap,\ 3.123 - JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javap.jar,\ 3.124 - JARMAIN:=com.sun.tools.javap.Main)) 3.125 - 3.126 - $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVADOC,$(BUILD_BOOTSTRAP_LANGTOOLS),\ 3.127 - SRCS:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap,\ 3.128 - JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javadoc.jar,\ 3.129 - JARMAIN:=com.sun.tools.javadoc.Main)) 3.130 - 3.131 - # GenStubs is used to bootstrap any dependencies from javac to the new JDK that is not 3.132 - # yet built. It is currently not needed but might be again in the future. The following 3.133 - # exercises the functionality to verify that it works. 3.134 - TOOL_GENSTUBS_CMD=$(JAVA) \ 3.135 - "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \ 3.136 - -classpath $(LANGTOOLS_OUTPUTDIR)/btclasses \ 3.137 - genstubs.GenStubs 3.138 - # We fetch source from the JDK... 3.139 - JDKS=$(JDK_TOPDIR)/src/share/classes 3.140 - # Build the list of classes to generate stubs from. java/util/Objects.java isn't 3.141 - # currently needed, but is used as a demo for now. 3.142 - STUBSOURCES:=$(shell $(FIND) $(JDKS) -name "*.java" | $(GREP) \ 3.143 - -e "$(JDKS)/java/util/Objects.java") 3.144 - # Rewrite the file names into class names because the GenStubs tool require this. 3.145 - STUBCLASSES:=$(subst /,.,$(patsubst $(JDKS)/%.java,%,$(STUBSOURCES))) 3.146 - 3.147 - # Now setup the build recipe for genstubs. 3.148 - $(LANGTOOLS_OUTPUTDIR)/genstubs/_the_stubs.d : $(STUBSOURCES) $(BUILD_TOOLS) \ 3.149 - $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \ 3.150 - $(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d 3.151 - mkdir -p $(@D) 3.152 - mkdir -p $(LANGTOOLS_OUTPUTDIR)/tmpstubs 3.153 - echo Generating stubs from JDK sources. 3.154 - ($(TOOL_GENSTUBS_CMD) -s $(LANGTOOLS_OUTPUTDIR)/tmpstubs -sourcepath $(JDKS) $(STUBCLASSES) && echo STUBS_ARE_CREATED=yes > $@) 3.155 - if $(DIFF) -x "_the*" -rq $(LANGTOOLS_OUTPUTDIR)/tmpstubs $(LANGTOOLS_OUTPUTDIR)/genstubs > /dev/null 2>&1; then \ 3.156 - echo No changes in the stubs!; \ 3.157 - rm -rf $(LANGTOOLS_OUTPUTDIR)/tmpstubs; \ 3.158 - else \ 3.159 - echo Changes in stubs detected!; \ 3.160 - rm -rf $(@D); \ 3.161 - mv $(LANGTOOLS_OUTPUTDIR)/tmpstubs $(@D); \ 3.162 - fi 3.163 - echo STUBS_ARE_CREATED=yes > $@ 3.164 - 3.165 - # Trigger a generation of the genstubs java source code and a restart 3.166 - # of the makefile to make sure that the following build setup use the 3.167 - # newly created java files. 3.168 - -include $(LANGTOOLS_OUTPUTDIR)/genstubs/_the_stubs.d 3.169 - 3.170 - ifeq ($(STUBS_ARE_CREATED),yes) 3.171 - # Setup a compiler configuration using the intermediate javac in dist/bootstrap/lib/javac.jar 3.172 - # that generates code for the new jdk that is being built. 3.173 - # The code compiled by this compiler setup, cannot necessarily be run with the bootstrap jvm. 3.174 - $(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE,\ 3.175 - JVM:=$(JAVA),\ 3.176 - JAVAC:="-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \ 3.177 - -jar $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar,\ 3.178 - FLAGS:=-XDignore.symbol.file=true -Xlint:all$(COMMA)-deprecation -Werror,\ 3.179 - SERVER_DIR:=$(SJAVAC_SERVER_DIR),\ 3.180 - SERVER_JVM:=$(SJAVAC_SERVER_JAVA))) 3.181 - 3.182 - # javax.tools.JavaCompilerTool isn't really a suffix but this gets the file copied. 3.183 - RESOURCE_SUFFIXES:=.gif .xml .css javax.tools.JavaCompilerTool 3.184 - 3.185 - $(eval $(call SetupJavaCompilation,BUILD_FULL_JAVAC,\ 3.186 - SETUP:=GENERATE_NEWBYTECODE,\ 3.187 - SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc \ 3.188 - $(LANGTOOLS_OUTPUTDIR)/genstubs,\ 3.189 - EXCLUDES:=java/util java/io java/nio,\ 3.190 - COPY:=$(RESOURCE_SUFFIXES),\ 3.191 - BIN:=$(LANGTOOLS_OUTPUTDIR)/classes)) 3.192 - 3.193 - $(eval $(call SetupArchive,ARCHIVE_FULL_JAVAC,$(BUILD_FULL_JAVAC),\ 3.194 - SETUP:=GENERATE_NEWBYTECODE,\ 3.195 - SRCS:=$(LANGTOOLS_OUTPUTDIR)/classes,\ 3.196 - SUFFIXES:=.class $(RESOURCE_SUFFIXES),\ 3.197 - JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/lib/classes.jar)) 3.198 - 3.199 - $(eval $(call SetupZipArchive,ZIP_FULL_JAVAC_SOURCE,\ 3.200 - SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc,\ 3.201 - ZIP:=$(LANGTOOLS_OUTPUTDIR)/dist/lib/src.zip)) 3.202 - 3.203 - all: $(LANGTOOLS_OUTPUTDIR)/dist/lib/classes.jar \ 3.204 - $(LANGTOOLS_OUTPUTDIR)/dist/lib/src.zip \ 3.205 - $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \ 3.206 - $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javah.jar \ 3.207 - $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javap.jar \ 3.208 - $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javadoc.jar 3.209 - 3.210 - 3.211 - endif 3.212 -endif 3.213 +all: 3.214 + @$(MAKE) -f $(top_level_makefile) $(subsystem_name)