makefiles/GensrcLocaleDataMetaInfo.gmk
Print this page
rev 5696 : 6336885: RFE: Locale Data Deployment Enhancements
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
Summary: JEP 127: Improve Locale Data Packaging and Adopt Unicode CLDR Data (part 1 w/o packaging changes. by Naoto Sato and Masayoshi Okutsu)
*** 45,98 ****
MISSING_RESOURCES:=$(filter-out $(LOCALE_RESOURCES),$(PREV_LOCALE_RESOURCES))
NEW_RESOURCES:=$(filter-out $(PREV_LOCALE_RESOURCES),$(LOCALE_RESOURCES))
ifneq (,$(MISSING_RESOURCES)$(NEW_RESOURCES))
# There is a difference in the number of supported resources. Trigger a regeneration.
! $(shell $(RM) $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/LocaleDataMetaInfo.java)
endif
# The non-euro zone locales have to be separated from the euro-zone locales.
NON_EURO_LOCALES:=ar% hi% iw% ja% ko% th% vi% zh%
# This macro creates a sed expression that substitues for example:
# #FormatData_EuroLocales# with: be be_BY bg bg_BG ca ca_ES... and some more.
! CAPTURE_LOCALE='s/$$(HASH)$1_$2EuroLocales$$(HASH)/ $$($3 $(NON_EURO_LOCALES),$$(filter-out $1,$$(subst $1_,,$$(filter $1_%,$(LOCALE_RESOURCES)))))/g'
! SED_ARGS:=-e 's|$(HASH)warn This file is preprocessed before being compiled|// -- This file was mechanically generated: Do not edit! -- //|g'
#sun.text.resources.FormatData
! $(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,FormatData,,filter-out))
! $(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,FormatData,Non,filter))
#sun.text.resources.CollationData
! $(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,CollationData,,filter-out))
! $(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,CollationData,Non,filter))
#sun.util.resources.TimeZoneNames
! $(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,TimeZoneNames,,filter-out))
! $(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,TimeZoneNames,Non,filter))
#sun.util.resources.LocaleNames
! $(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,LocaleNames,,filter-out))
! $(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,LocaleNames,Non,filter))
#sun.util.resources.CurrencyNames
! $(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,CurrencyNames,,filter-out))
! $(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,CurrencyNames,Non,filter))
#sun.util.resources.CalendarData
! $(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,CalendarData,,filter-out))
! $(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,CalendarData,Non,filter))
! $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/LocaleDataMetaInfo.java: \
! $(JDK_TOPDIR)/src/share/classes/sun/util/LocaleDataMetaInfo-XLocales.java.template
$(MKDIR) -p $(@D)
$(ECHO) Creating sun/util/LocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources.
$(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" > $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/_the.locale_resources
! $(SED) $(SED_ARGS) $(JDK_TOPDIR)/src/share/classes/sun/util/LocaleDataMetaInfo-XLocales.java.template \
! > $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/LocaleDataMetaInfo.java
! GENSRC_LOCALEDATAMETAINFO:=$(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/LocaleDataMetaInfo.java
###
GENSRC_CRBC_DST := $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/CoreResourceBundleControl.java
GENSRC_CRBC_CMD := $(JDK_TOPDIR)/makefiles/scripts/localelist.sh
--- 45,108 ----
MISSING_RESOURCES:=$(filter-out $(LOCALE_RESOURCES),$(PREV_LOCALE_RESOURCES))
NEW_RESOURCES:=$(filter-out $(PREV_LOCALE_RESOURCES),$(LOCALE_RESOURCES))
ifneq (,$(MISSING_RESOURCES)$(NEW_RESOURCES))
# There is a difference in the number of supported resources. Trigger a regeneration.
! $(shell $(RM) $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/locale/provider/LocaleDataMetaInfo.java)
endif
# The non-euro zone locales have to be separated from the euro-zone locales.
NON_EURO_LOCALES:=ar% hi% iw% ja% ko% th% vi% zh%
+ # ja-JP-JP and th-TH-TH need to be manually added, as they don't have any resource files.
+ ALL_NON_EURO_LOCALES:=ja-JP-JP th-TH-TH
+
+ SED_ARGS:=-e 's|$(HASH)warn This file is preprocessed before being compiled|// -- This file was mechanically generated: Do not edit! -- //|g'
+
# This macro creates a sed expression that substitues for example:
# #FormatData_EuroLocales# with: be be_BY bg bg_BG ca ca_ES... and some more.
! define CaptureLocale
! $1_LOCALES := $$(subst _,-,$$(filter-out $1,$$(subst $1_,,$$(filter $1_%,$(LOCALE_RESOURCES)))))
! $1_EURO_LOCALES := $$(filter-out $(NON_EURO_LOCALES),$$($1_LOCALES))
! $1_NON_EURO_LOCALES := $$(filter $(NON_EURO_LOCALES),$$($1_LOCALES))
! ALL_EURO_LOCALES += $$($1_EURO_LOCALES)
! ALL_NON_EURO_LOCALES += $$($1_NON_EURO_LOCALES)
!
! SED_ARGS+= -e 's/$$(HASH)$1_EuroLocales$$(HASH)/ $$($1_EURO_LOCALES)/g'
! SED_ARGS+= -e 's/$$(HASH)$1_NonEuroLocales$$(HASH)/ $$($1_NON_EURO_LOCALES)/g'
! endef
!
#sun.text.resources.FormatData
! $(eval $(call CaptureLocale,FormatData))
#sun.text.resources.CollationData
! $(eval $(call CaptureLocale,CollationData))
#sun.util.resources.TimeZoneNames
! $(eval $(call CaptureLocale,TimeZoneNames))
#sun.util.resources.LocaleNames
! $(eval $(call CaptureLocale,LocaleNames))
#sun.util.resources.CurrencyNames
! $(eval $(call CaptureLocale,CurrencyNames))
#sun.util.resources.CalendarData
! $(eval $(call CaptureLocale,CalendarData))
! SED_ARGS+= -e 's/$(HASH)AvailableLocales_EuroLocales$(HASH)/$(sort $(ALL_EURO_LOCALES))/g'
! SED_ARGS+= -e 's/$(HASH)AvailableLocales_NonEuroLocales$(HASH)/$(sort $(ALL_NON_EURO_LOCALES))/g'
!
! $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/locale/provider/LocaleDataMetaInfo.java: \
! $(JDK_TOPDIR)/src/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
$(MKDIR) -p $(@D)
$(ECHO) Creating sun/util/LocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources.
$(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" > $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/_the.locale_resources
! $(SED) $(SED_ARGS) $< > $@
! GENSRC_LOCALEDATAMETAINFO:=$(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/locale/provider/LocaleDataMetaInfo.java
###
GENSRC_CRBC_DST := $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/CoreResourceBundleControl.java
GENSRC_CRBC_CMD := $(JDK_TOPDIR)/makefiles/scripts/localelist.sh