mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-12 22:50:08 +00:00
4609153: Provide locale data for Indic locales 5104387: Support for gl_ES locale (galician language) 6337471: desktop/system locale preferences support 7056139: (cal) SPI support for locale-dependent Calendar parameters 7058206: Provide CalendarData SPI for week params and display field value names 7073852: Support multiple scripts for digits and decimal symbols per locale 7079560: [Fmt-Da] Context dependent month names support in SimpleDateFormat 7171324: getAvailableLocales() of locale sensitive services should return the actual availability of locales 7151414: (cal) Support calendar type identification 7168528: LocaleServiceProvider needs to be aware of Locale extensions 7171372: (cal) locale's default Calendar should be created if unknown calendar is specified JEP 127: Improve Locale Data Packaging and Adopt Unicode CLDR Data (part 1 w/o packaging changes. by Naoto Sato and Masayoshi Okutsu) Reviewed-by: erikj, sherman, peytoia
114 lines
4.5 KiB
Plaintext
114 lines
4.5 KiB
Plaintext
#
|
|
# Copyright (c) 2005, 2010, 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.
|
|
#
|
|
|
|
#
|
|
# This file defines rules to build the locales information for
|
|
# resources in "sun.util.resources" & "sun.text.resources" packages
|
|
#
|
|
|
|
# Save the current FILES_java & FILES_compiled_properties variables
|
|
|
|
FILES_java_orig := $(FILES_java)
|
|
FILES_compiled_properties_orig := $(FILES_compiled_properties)
|
|
|
|
|
|
# Since all the resources files are going to be compiled into class file format,
|
|
# only FILES_java and FILES_compiled_properties variables will be picked up
|
|
#
|
|
# $(BUILDDIR)/java/util/FILES_java.gmk & $(BUILDDIR)/java/util/FILES_properties.gmk
|
|
# contain "sun.util.resources" for European language support
|
|
|
|
include $(BUILDDIR)/java/util/FILES_java.gmk
|
|
include $(BUILDDIR)/java/util/FILES_properties.gmk
|
|
|
|
Euro_Resources_java := $(FILES_java)
|
|
Euro_Resources_properties := $(FILES_compiled_properties)
|
|
|
|
# $(BUILDDIR)/java/text/FILES_java.gmk contains the "sun.text.resources" for
|
|
# European language support
|
|
|
|
include $(BUILDDIR)/java/text/base/FILES_java.gmk
|
|
|
|
Euro_Resources_java += $(FILES_java)
|
|
|
|
FILES_compiled_properties=
|
|
|
|
# $(BUILDDIR)/sun/text/FILES_java.gmk & $(BUILDDIR)/sun/text/FILES_properties.gmk
|
|
# contain both resources for Non-European language support
|
|
|
|
include $(BUILDDIR)/sun/text/FILES_java.gmk
|
|
include $(BUILDDIR)/sun/text/FILES_properties.gmk
|
|
|
|
NonEuro_Resources_java := $(FILES_java)
|
|
NonEuro_Resources_properties := $(FILES_compiled_properties)
|
|
|
|
# Restore the orignal FILES_java & FILES_compiled_properties variables
|
|
FILES_java := $(FILES_java_orig)
|
|
FILES_compiled_properties := $(FILES_compiled_properties_orig)
|
|
|
|
LocaleDataMetaInfo_Src=$(SHARE_SRC)/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
|
|
LocaleDataMetaInfo_Dest=$(GENSRCDIR)/sun/util/locale/provider/LocaleDataMetaInfo.java
|
|
LOCALEGEN_SH=localegen.sh
|
|
RESOURCE_NAMES="FormatData CollationData TimeZoneNames LocaleNames CurrencyNames CalendarData"
|
|
|
|
|
|
# On MacOSX sed does not enter a newline as it does on other platforms with the same pattern
|
|
# Using awk instead
|
|
|
|
ifeq ($(PLATFORM), macosx)
|
|
|
|
$(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH)
|
|
@$(RM) $@.tmp.euro $@.tmp.noneuro;
|
|
@$(prep-target)
|
|
@$(ECHO) $(Euro_Resources_properties) | $(NAWK) 'gsub(/.properties/,"\n") {print}' > $@.tmp.euro;
|
|
@$(ECHO) $(Euro_Resources_java) | $(NAWK) 'gsub(/.java/,"\n") {print}' >> $@.tmp.euro;
|
|
@$(ECHO) $(NonEuro_Resources_properties) | $(NAWK) 'gsub(/.properties/,"\n") {print}' > $@.tmp.noneuro;
|
|
@$(ECHO) $(NonEuro_Resources_java) | $(NAWK) 'gsub(/.java/,"\n") {print}' >> $@.tmp.noneuro;
|
|
NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \
|
|
$(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \
|
|
$@.tmp.noneuro $< $@
|
|
@$(RM) $@.tmp.euro $@.tmp.noneuro;
|
|
|
|
else
|
|
|
|
$(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH)
|
|
@$(RM) $@.tmp.euro $@.tmp.noneuro;
|
|
@$(prep-target)
|
|
@$(ECHO) $(subst .properties,'\n',$(Euro_Resources_properties)) > $@.tmp.euro;
|
|
@$(ECHO) $(subst .java,'\n',$(Euro_Resources_java)) >> $@.tmp.euro;
|
|
@$(ECHO) $(subst .properties,'\n',$(NonEuro_Resources_properties)) > $@.tmp.noneuro;
|
|
@$(ECHO) $(subst .java,'\n',$(NonEuro_Resources_java)) >> $@.tmp.noneuro;
|
|
NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \
|
|
$(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \
|
|
$@.tmp.noneuro $< $@
|
|
@$(RM) $@.tmp.euro $@.tmp.noneuro;
|
|
endif
|
|
|
|
genlocales : $(LocaleDataMetaInfo_Dest)
|
|
|
|
clean clobber::
|
|
$(RM) $(LocaleDataMetaInfo_Dest)
|
|
|