83 |
83 |
84 # Accumulate all found properties files. |
84 # Accumulate all found properties files. |
85 ALL_CLEANED_PROPSOURCES+=$2 |
85 ALL_CLEANED_PROPSOURCES+=$2 |
86 |
86 |
87 # Generate the list of to be created java files. |
87 # Generate the list of to be created java files. |
88 $1_PROPOUTPUT:=$$(patsubst %,$(JDK_OUTPUTDIR)/newclasses/%.properties,$$($1_PROPPATHS)) |
88 $1_PROPOUTPUT:=$$(patsubst %,$(JDK_OUTPUTDIR)/classes/%.properties,$$($1_PROPPATHS)) |
89 # If the properties target file isn't in a "resources" dir, add one. |
89 # If the properties target file isn't in a "resources" dir, add one. |
90 ifneq ($5,) |
90 ifneq ($5,) |
91 $1_PROPOUTPUT:=$$(foreach p,$$($1_PROPOUTPUT), $$(dir $$p)$5/$$(notdir $$p)) |
91 $1_PROPOUTPUT:=$$(foreach p,$$($1_PROPOUTPUT), $$(dir $$p)$5/$$(notdir $$p)) |
92 endif |
92 endif |
93 |
93 |
119 ListResourceBundle)) |
119 ListResourceBundle)) |
120 $(eval $(call add_properties_to_compile,COM_SUN_ACCESSIBILITY_HK,\ |
120 $(eval $(call add_properties_to_compile,COM_SUN_ACCESSIBILITY_HK,\ |
121 $(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/accessibility/internal/resources -name "*.properties"),\ |
121 $(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/accessibility/internal/resources -name "*.properties"),\ |
122 ListResourceBundle,%zh_TW,%zh_HK)) |
122 ListResourceBundle,%zh_TW,%zh_HK)) |
123 #com/sun/imageio/plugins/common |
123 #com/sun/imageio/plugins/common |
|
124 $(eval $(call add_properties_to_clean,COM_SUN_IMAGEIO,\ |
|
125 $(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/imageio -name "*.properties"))) |
124 #com/sun/java/swing/plaf/gtk/resources |
126 #com/sun/java/swing/plaf/gtk/resources |
|
127 ifneq ($(PLATFORM), windows) |
|
128 # Only compile GTK resource bundles on Solaris/Linux |
|
129 $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_GTK,\ |
|
130 $(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/gtk/resources -name "*.properties"),\ |
|
131 ListResourceBundle)) |
|
132 $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_GTK_HK,\ |
|
133 $(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/gtk/resources -name "*.properties"),\ |
|
134 ListResourceBundle,%zh_TW,%zh_HK)) |
|
135 endif |
125 #com/sun/java/swing/plaf/motif/resources |
136 #com/sun/java/swing/plaf/motif/resources |
|
137 $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_MOTIF,\ |
|
138 $(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/motif/resources -name "*.properties"),\ |
|
139 ListResourceBundle)) |
|
140 $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_MOTIF_HK,\ |
|
141 $(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/motif/resources -name "*.properties"),\ |
|
142 ListResourceBundle,%zh_TW,%zh_HK)) |
126 #com/sun/java/swing/plaf/windows/resources |
143 #com/sun/java/swing/plaf/windows/resources |
|
144 $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_WINDOWS,\ |
|
145 $(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/windows/resources -name "*.properties"),\ |
|
146 ListResourceBundle)) |
|
147 $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_WINDOWS_HK,\ |
|
148 $(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/windows/resources -name "*.properties"),\ |
|
149 ListResourceBundle,%zh_TW,%zh_HK)) |
127 #com/sun/java/util/jar/pack |
150 #com/sun/java/util/jar/pack |
128 $(eval $(call add_properties_to_clean,JNDI_COSNAMING,\ |
151 $(eval $(call add_properties_to_clean,JNDI_COSNAMING,\ |
129 $(JDK_TOPDIR)/src/share/classes/com/sun/java/util/jar/pack/intrinsic.properties)) |
152 $(JDK_TOPDIR)/src/share/classes/com/sun/java/util/jar/pack/intrinsic.properties)) |
130 #com/sun/jndi/cosnaming |
153 #com/sun/jndi/cosnaming |
131 $(eval $(call add_properties_to_clean,JNDI_COSNAMING,\ |
154 $(eval $(call add_properties_to_clean,JNDI_COSNAMING,\ |
147 $(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/rowset -name "*zh_TW.properties"),\ |
170 $(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/rowset -name "*zh_TW.properties"),\ |
148 %zh_TW,%zh_HK)) |
171 %zh_TW,%zh_HK)) |
149 |
172 |
150 #com/sun/servicetag/resources |
173 #com/sun/servicetag/resources |
151 #com/sun/swing/internal/plaf/basic/resources |
174 #com/sun/swing/internal/plaf/basic/resources |
|
175 $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_BASIC,\ |
|
176 $(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/basic/resources -name "*.properties"),\ |
|
177 ListResourceBundle)) |
|
178 $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_BASIC_HK,\ |
|
179 $(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/basic/resources -name "*.properties"),\ |
|
180 ListResourceBundle,%zh_TW,%zh_HK)) |
152 #com/sun/swing/internal/plaf/metal/resources |
181 #com/sun/swing/internal/plaf/metal/resources |
|
182 $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_METAL,\ |
|
183 $(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/metal/resources -name "*.properties"),\ |
|
184 ListResourceBundle)) |
|
185 $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_METAL_HK,\ |
|
186 $(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/metal/resources -name "*.properties"),\ |
|
187 ListResourceBundle,%zh_TW,%zh_HK)) |
153 #com/sun/swing/internal/plaf/synth/resources |
188 #com/sun/swing/internal/plaf/synth/resources |
|
189 $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_SYNTH,\ |
|
190 $(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/synth/resources -name "*.properties"),\ |
|
191 ListResourceBundle)) |
|
192 $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_SYNTH_HK,\ |
|
193 $(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/synth/resources -name "*.properties"),\ |
|
194 ListResourceBundle,%zh_TW,%zh_HK)) |
154 |
195 |
155 #com/sun/tools/jdi/resources |
196 #com/sun/tools/jdi/resources |
156 $(eval $(call add_properties_to_compile,COM_SUN_TOOLS_JDI,\ |
197 $(eval $(call add_properties_to_compile,COM_SUN_TOOLS_JDI,\ |
157 $(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/tools/jdi/resources -name "*.properties"),\ |
198 $(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/tools/jdi/resources -name "*.properties"),\ |
158 ListResourceBundle)) |
199 ListResourceBundle)) |
159 |
200 |
160 #com/sun/tools/script/shell |
201 #com/sun/tools/script/shell |
161 #java/util |
202 #java/util |
162 #javax/sql/rowset |
203 #javax/sql/rowset |
|
204 $(eval $(call add_properties_to_clean,JAVAX_SQL_ROWSET,\ |
|
205 $(shell find $(JDK_TOPDIR)/src/share/classes/javax/sql/rowset -name "*.properties"))) |
163 #sun/awt/resources |
206 #sun/awt/resources |
164 $(eval $(call add_properties_to_compile,SUN_AWT,\ |
207 $(eval $(call add_properties_to_compile,SUN_AWT,\ |
165 $(shell find $(JDK_TOPDIR)/src/share/classes/sun/awt/resources -name "*.properties"),\ |
208 $(shell find $(JDK_TOPDIR)/src/share/classes/sun/awt/resources -name "*.properties"),\ |
166 ListResourceBundle)) |
209 ListResourceBundle)) |
167 $(eval $(call add_properties_to_compile,SUN_AWT_HK,\ |
210 $(eval $(call add_properties_to_compile,SUN_AWT_HK,\ |
173 ListResourceBundle)) |
216 ListResourceBundle)) |
174 $(eval $(call add_properties_to_compile,SUN_LAUNCHER_HK,\ |
217 $(eval $(call add_properties_to_compile,SUN_LAUNCHER_HK,\ |
175 $(shell find $(JDK_TOPDIR)/src/share/classes/sun/launcher/resources -name "*.properties"),\ |
218 $(shell find $(JDK_TOPDIR)/src/share/classes/sun/launcher/resources -name "*.properties"),\ |
176 ListResourceBundle,%zh_TW,%zh_HK)) |
219 ListResourceBundle,%zh_TW,%zh_HK)) |
177 #sun/management/resources |
220 #sun/management/resources |
|
221 $(eval $(call add_properties_to_compile,SUN_MANAGEMENT,\ |
|
222 $(shell find $(JDK_TOPDIR)/src/share/classes/sun/management/resources -name "*.properties"),\ |
|
223 ListResourceBundle)) |
|
224 $(eval $(call add_properties_to_compile,SUN_MANAGEMENT_KH,\ |
|
225 $(shell find $(JDK_TOPDIR)/src/share/classes/sun/management/resources -name "*.properties"),\ |
|
226 ListResourceBundle,%zh_TW,%zh_HK)) |
178 #sun/print |
227 #sun/print |
179 #sun/print/resources |
228 #sun/print/resources |
180 $(eval $(call add_properties_to_compile,SUN_PRINT,\ |
229 $(eval $(call add_properties_to_compile,SUN_PRINT,\ |
181 $(shell find $(JDK_TOPDIR)/src/share/classes/sun/print/resources -name "*.properties"),\ |
230 $(shell find $(JDK_TOPDIR)/src/share/classes/sun/print/resources -name "*.properties"),\ |
182 ListResourceBundle)) |
231 ListResourceBundle)) |
229 # sun/util/resources |
278 # sun/util/resources |
230 $(eval $(call add_properties_to_compile,SUN_UTIL,\ |
279 $(eval $(call add_properties_to_compile,SUN_UTIL,\ |
231 $(shell find $(JDK_TOPDIR)/src/share/classes/sun/util/resources -name "*.properties"),\ |
280 $(shell find $(JDK_TOPDIR)/src/share/classes/sun/util/resources -name "*.properties"),\ |
232 LocaleNamesBundle)) |
281 LocaleNamesBundle)) |
233 |
282 |
234 |
|
235 # Now setup the rule for the generation of the resource bundles. |
283 # Now setup the rule for the generation of the resource bundles. |
236 $(JDK_OUTPUTDIR)/gensrc_properties/_the.compiled_properties : $(ALL_COMPILED_PROPSOURCES) $(BUILD_TOOLS) |
284 $(JDK_OUTPUTDIR)/gensrc_properties/_the.compiled_properties : $(ALL_COMPILED_PROPSOURCES) $(BUILD_TOOLS) |
237 $(RM) -rf $(JDK_OUTPUTDIR)/gensrc_properties/* |
285 $(RM) -rf $(JDK_OUTPUTDIR)/gensrc_properties/* |
238 # Generate all output directories in advance since the build tool does not do that... |
286 # Generate all output directories in advance since the build tool does not do that... |
239 $(MKDIR) -p $(sort $(dir $(ALL_COMPILED_PROPJAVAS))) |
287 $(MKDIR) -p $(sort $(dir $(ALL_COMPILED_PROPJAVAS))) |
240 echo Compiling $(words $(ALL_COMPILED_PROPSOURCES)) properties into resource bundles |
288 $(ECHO) Compiling $(words $(ALL_COMPILED_PROPSOURCES)) properties into resource bundles |
241 $(call ListPathsSafely,COMPILE_PROPCMDLINE,\n, >> $(JDK_OUTPUTDIR)/gensrc_properties/_the.cmdline) |
289 $(call ListPathsSafely,COMPILE_PROPCMDLINE,\n, >> $(JDK_OUTPUTDIR)/gensrc_properties/_the.cmdline) |
242 $(TOOL_COMPILEPROPERTIES) -quiet @$(JDK_OUTPUTDIR)/gensrc_properties/_the.cmdline |
290 $(TOOL_COMPILEPROPERTIES) -quiet @$(JDK_OUTPUTDIR)/gensrc_properties/_the.cmdline |
243 touch $@ |
291 $(TOUCH) $@ |
244 |
292 |
245 # Now setup the rule for the generation of the cleaned properties. |
293 # Now setup the rule for the generation of the cleaned properties. |
246 # FIXME: We currently don't handle removed properties incrementally. |
294 # FIXME: We currently don't handle removed properties incrementally. |
247 $(JDK_OUTPUTDIR)/newclasses/_the.cleaned_properties : $(ALL_CLEANED_PROPSOURCES) $(BUILD_TOOLS) |
295 $(JDK_OUTPUTDIR)/classes/_the.cleaned_properties : $(ALL_CLEANED_PROPSOURCES) $(BUILD_TOOLS) |
248 $(RM) -f $(JDK_OUTPUTDIR)/newclasses/_the.cleaned_properties.cmdline |
296 $(RM) -f $(JDK_OUTPUTDIR)/classes/_the.cleaned_properties.cmdline |
249 # Generate all output directories in advance since the build tool does not do that... |
297 # Generate all output directories in advance since the build tool does not do that... |
250 $(MKDIR) -p $(sort $(dir $(ALL_CLEANED_PROPOUTPUT))) |
298 $(MKDIR) -p $(sort $(dir $(ALL_CLEANED_PROPOUTPUT))) |
251 echo Copying and cleaning $(words $(ALL_CLEANED_PROPSOURCES)) properties |
299 $(ECHO) Copying and cleaning $(words $(ALL_CLEANED_PROPSOURCES)) properties |
252 $(call ListPathsSafely,CLEAN_PROPCMDLINE,\n, >> $(JDK_OUTPUTDIR)/newclasses/_the.cleaned_properties.cmdline) |
300 $(call ListPathsSafely,CLEAN_PROPCMDLINE,\n, >> $(JDK_OUTPUTDIR)/classes/_the.cleaned_properties.cmdline) |
253 $(TOOL_STRIPPROPERTIES) @$(JDK_OUTPUTDIR)/newclasses/_the.cleaned_properties.cmdline |
301 $(TOOL_STRIPPROPERTIES) @$(JDK_OUTPUTDIR)/classes/_the.cleaned_properties.cmdline |
254 touch $@ |
302 $(TOUCH) $@ |
255 |
303 |
256 $(ALL_COMPILED_PROPJAVAS) : $(JDK_OUTPUTDIR)/gensrc_properties/_the.compiled_properties |
304 $(ALL_COMPILED_PROPJAVAS) : $(JDK_OUTPUTDIR)/gensrc_properties/_the.compiled_properties |
257 |
305 |
258 $(ALL_CLEANED_PROPOUTPUT) : $(JDK_OUTPUTDIR)/newclasses/_the.cleaned_properties |
306 $(ALL_CLEANED_PROPOUTPUT) : $(JDK_OUTPUTDIR)/classes/_the.cleaned_properties |
259 |
307 |
260 |
308 |
261 # Some zh_HK resources are just copied of zh_TW |
309 # Some zh_HK resources are just copied of zh_TW |
262 $(JDK_OUTPUTDIR)/gensrc_properties/%_zh_HK.java: $(JDK_TOPDIR)/src/share/classes/%_zh_TW.java |
310 $(JDK_OUTPUTDIR)/gensrc_properties/%_zh_HK.java: $(JDK_TOPDIR)/src/share/classes/%_zh_TW.java |
263 $(MKDIR) -p $(@D) |
311 $(MKDIR) -p $(@D) |
264 $(CAT) $< | $(SED) -e '/class/s/_zh_TW/_zh_HK/' > $@ |
312 $(CAT) $< | $(SED) -e '/class/s/_zh_TW/_zh_HK/' > $@ |
265 |
313 |
266 ZH_HK_JAVA:= sun/applet/resources/MsgAppletViewer_zh_HK.java \ |
314 ZH_HK_JAVA:= sun/applet/resources/MsgAppletViewer_zh_HK.java \ |
267 sun/misc/resources/Messages_zh_HK.java \ |
315 sun/misc/resources/Messages_zh_HK.java \ |
268 sun/security/util/AuthResources_zh_HK.java |
316 sun/security/util/AuthResources_zh_HK.java \ |
|
317 sun/security/util/Resources_zh_HK.java |
|
318 |
269 ZH_HK_JAVA_FILES:=$(addprefix $(JDK_OUTPUTDIR)/gensrc_properties/,$(ZH_HK_JAVA)) |
319 ZH_HK_JAVA_FILES:=$(addprefix $(JDK_OUTPUTDIR)/gensrc_properties/,$(ZH_HK_JAVA)) |
270 |
320 |
271 |
321 |
272 GENSRC_PROPERTIES:=$(ALL_COMPILED_PROPJAVAS) $(ALL_CLEANED_PROPOUTPUT) $(ZH_HK_JAVA_FILES) |
322 GENSRC_PROPERTIES:=$(ALL_COMPILED_PROPJAVAS) $(ALL_CLEANED_PROPOUTPUT) $(ZH_HK_JAVA_FILES) |