# # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. Oracle designates this # particular file as subject to the "Classpath" exception as provided # by Oracle in the LICENSE file that accompanied this code. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # # All .properties files to be compiled are appended to this variable. ALL_COMPILED_PROPSOURCES := # All generated .java files from compilation are appended to this variable. ALL_COMPILED_PROPJAVAS := # The (very long) command line for compilation, stored in a file, prior to use. COMPILE_PROPCMDLINE := define add_properties_to_compile # $1 is the name of the properties group # $2 is the files belonging to this group # $3 is the super class for the generated java file. # Convert /jdk/src//share/classes/sun/util/resources/CurrencyNames_sv.properties # to /jdk/gensrc/> $(JDK_OUTPUTDIR)/gensrc/_the.cmdline) $(TOOL_COMPILEPROPERTIES) -quiet @$(JDK_OUTPUTDIR)/gensrc/_the.cmdline $(TOUCH) $@ $(ALL_COMPILED_PROPJAVAS): $(JDK_OUTPUTDIR)/gensrc/_the.compiled_properties ################################################################################ # Some zh_HK resources are just copies of zh_TW define convert_tw_to_hk $(MKDIR) -p $(@D) $(CAT) $< | $(SED) -e '/class/s/_zh_TW/_zh_HK/' > $@ endef # Some are copies of existing sources $(JDK_OUTPUTDIR)/gensrc/java.desktop/%_zh_HK.java: \ $(JDK_TOPDIR)/src/java.desktop/share/classes/%_zh_TW.java $(call convert_tw_to_hk) $(JDK_OUTPUTDIR)/gensrc/java.base/%_zh_HK.java: \ $(JDK_TOPDIR)/src/java.base/share/classes/%_zh_TW.java $(call convert_tw_to_hk) # Others are copies of sources generated by this makefile $(JDK_OUTPUTDIR)/gensrc/%_zh_HK.java: $(JDK_OUTPUTDIR)/gensrc/%_zh_TW.java $(call convert_tw_to_hk) # The existing sources ZH_HK_JAVA := java.desktop/sun/applet/resources/MsgAppletViewer_zh_HK.java \ java.base/sun/misc/resources/Messages_zh_HK.java \ java.base/sun/security/util/AuthResources_zh_HK.java \ java.base/sun/security/util/Resources_zh_HK.java ZH_HK_JAVA_FILES := $(addprefix $(JDK_OUTPUTDIR)/gensrc/, $(ZH_HK_JAVA)) \ $(filter-out $(JDK_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/zh/%, \ $(subst _zh_TW,_zh_HK,$(filter %_zh_TW.java, $(ALL_COMPILED_PROPJAVAS)))) ################################################################################ GENSRC_PROPERTIES := $(ALL_COMPILED_PROPJAVAS) $(ZH_HK_JAVA_FILES)