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