55 # Lookup the properties that need to be compiled into resource bundles. 56 PROPSOURCES:=$(shell find $(LANGTOOLS_TOPDIR)/src/share/classes -name "*.properties") 57 # Strip away prefix and suffix, leaving for example only: "com/sun/tools/javac/resources/javac_zh_CN" 58 PROPPATHS:=$(patsubst $(LANGTOOLS_TOPDIR)/src/share/classes/%.properties,%,$(PROPSOURCES)) 59 # Generate the list of java files to be created. 60 PROPJAVAS:=$(patsubst %,$(LANGTOOLS_OUTPUTDIR)/gensrc/%.java,$(PROPPATHS)) 61 # Generate the package dirs for the tobe generated java files. 62 PROPDIRS:=$(dir $(PROPJAVAS)) 63 # Now generate a sequence of "-compile ...javac_zh_CN.properties ...javac_zh_CN.java java.util.ListResourceBundle" 64 # suitable to be fed into the CompileProperties command. 65 PROPCMDLINE:=$(subst _SPACE_,$(SPACE),$(join $(addprefix -compile_SPACE_,$(PROPSOURCES)), \ 66 $(addsuffix _SPACE_java.util.ListResourceBundle,$(addprefix _SPACE_$(LANGTOOLS_OUTPUTDIR)/gensrc/,$(addsuffix .java,$(PROPPATHS)))))) 67 68 # Now setup the rule for the generation of the resource bundles. 69 $(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d : $(PROPSOURCES) $(BUILD_TOOLS) 70 rm -rf $(@D)/* 71 mkdir -p $(@D) $(PROPDIRS) 72 printf "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties 73 printf "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.properties 74 printf "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.properties 75 echo Compiling $(words $(PROPSOURCES) v1 v2 v3) properties into resource bundles 76 $(TOOL_COMPILEPROPS_CMD) $(PROPCMDLINE) \ 77 -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties \ 78 $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.java \ 79 java.util.ListResourceBundle \ 80 -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.properties \ 81 $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.java \ 82 java.util.ListResourceBundle \ 83 -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.properties \ 84 $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.java \ 85 java.util.ListResourceBundle 86 echo PROPS_ARE_CREATED=yes > $@ 87 88 # Trigger the generation of the resource bundles. After the resource bundles have 89 # been compiled, then the makefile will restart and the newly created java files 90 # will become part of the build further along in the makefile. 91 -include $(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d 92 93 ifeq ($(PROPS_ARE_CREATED),yes) 94 # Setup the rules to build a dist/bootstrap/lib/javac.jar, ie a smaller intermediate javac 95 # that can be compiled with an old javac. The intermediate javac is then used 96 # to compile javac again and to build the complete new jdk. 97 $(eval $(call SetupJavaCompilation,BUILD_BOOTSTRAP_LANGTOOLS,\ 98 SETUP:=BOOT_JAVAC,\ 99 DISABLE_SJAVAC:=true,\ 100 SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc,\ 101 EXCLUDES:=com/sun/tools/javac/nio,\ 102 BIN:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap)) 103 104 $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAC,$(BUILD_BOOTSTRAP_LANGTOOLS),\ | 55 # Lookup the properties that need to be compiled into resource bundles. 56 PROPSOURCES:=$(shell find $(LANGTOOLS_TOPDIR)/src/share/classes -name "*.properties") 57 # Strip away prefix and suffix, leaving for example only: "com/sun/tools/javac/resources/javac_zh_CN" 58 PROPPATHS:=$(patsubst $(LANGTOOLS_TOPDIR)/src/share/classes/%.properties,%,$(PROPSOURCES)) 59 # Generate the list of java files to be created. 60 PROPJAVAS:=$(patsubst %,$(LANGTOOLS_OUTPUTDIR)/gensrc/%.java,$(PROPPATHS)) 61 # Generate the package dirs for the tobe generated java files. 62 PROPDIRS:=$(dir $(PROPJAVAS)) 63 # Now generate a sequence of "-compile ...javac_zh_CN.properties ...javac_zh_CN.java java.util.ListResourceBundle" 64 # suitable to be fed into the CompileProperties command. 65 PROPCMDLINE:=$(subst _SPACE_,$(SPACE),$(join $(addprefix -compile_SPACE_,$(PROPSOURCES)), \ 66 $(addsuffix _SPACE_java.util.ListResourceBundle,$(addprefix _SPACE_$(LANGTOOLS_OUTPUTDIR)/gensrc/,$(addsuffix .java,$(PROPPATHS)))))) 67 68 # Now setup the rule for the generation of the resource bundles. 69 $(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d : $(PROPSOURCES) $(BUILD_TOOLS) 70 rm -rf $(@D)/* 71 mkdir -p $(@D) $(PROPDIRS) 72 printf "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties 73 printf "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.properties 74 printf "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.properties 75 printf "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/jdeps/resources/version.properties 76 echo Compiling $(words $(PROPSOURCES) v1 v2 v3) properties into resource bundles 77 $(TOOL_COMPILEPROPS_CMD) $(PROPCMDLINE) \ 78 -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties \ 79 $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.java \ 80 java.util.ListResourceBundle \ 81 -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.properties \ 82 $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.java \ 83 java.util.ListResourceBundle \ 84 -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.properties \ 85 $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.java \ 86 java.util.ListResourceBundle \ 87 -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/jdeps/resources/version.properties \ 88 $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/jdeps/resources/version.java \ 89 java.util.ListResourceBundle 90 echo PROPS_ARE_CREATED=yes > $@ 91 92 # Trigger the generation of the resource bundles. After the resource bundles have 93 # been compiled, then the makefile will restart and the newly created java files 94 # will become part of the build further along in the makefile. 95 -include $(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d 96 97 ifeq ($(PROPS_ARE_CREATED),yes) 98 # Setup the rules to build a dist/bootstrap/lib/javac.jar, ie a smaller intermediate javac 99 # that can be compiled with an old javac. The intermediate javac is then used 100 # to compile javac again and to build the complete new jdk. 101 $(eval $(call SetupJavaCompilation,BUILD_BOOTSTRAP_LANGTOOLS,\ 102 SETUP:=BOOT_JAVAC,\ 103 DISABLE_SJAVAC:=true,\ 104 SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc,\ 105 EXCLUDES:=com/sun/tools/javac/nio,\ 106 BIN:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap)) 107 108 $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAC,$(BUILD_BOOTSTRAP_LANGTOOLS),\ |