diff -r 5e40a295cce2 -r 453837141fac jdk/makefiles/GensrcLocaleDataMetaInfo.gmk --- a/jdk/makefiles/GensrcLocaleDataMetaInfo.gmk Wed Oct 09 23:19:08 2013 -0700 +++ b/jdk/makefiles/GensrcLocaleDataMetaInfo.gmk Thu Oct 10 15:06:21 2013 +0200 @@ -28,49 +28,49 @@ # into LocaleDataMetaInfo.java # First go look for all locale files -LOCALE_FILES:=$(shell $(FIND) $(JDK_TOPDIR)/src/share/classes \ - -name "FormatData_*.java" -o -name "FormatData_*.properties" -o \ - -name "CollationData_*.java" -o -name "CollationData_*.properties" -o \ - -name "TimeZoneNames_*.java" -o -name "TimeZoneNames_*.properties" -o \ - -name "LocaleNames_*.java" -o -name "LocaleNames_*.properties" -o \ - -name "CurrencyNames_*.java" -o -name "CurrencyNames_*.properties" -o \ - -name "CalendarData_*.java" -o -name "CalendarData_*.properties") +LOCALE_FILES := $(shell $(FIND) $(JDK_TOPDIR)/src/share/classes \ + -name "FormatData_*.java" -o -name "FormatData_*.properties" -o \ + -name "CollationData_*.java" -o -name "CollationData_*.properties" -o \ + -name "TimeZoneNames_*.java" -o -name "TimeZoneNames_*.properties" -o \ + -name "LocaleNames_*.java" -o -name "LocaleNames_*.properties" -o \ + -name "CurrencyNames_*.java" -o -name "CurrencyNames_*.properties" -o \ + -name "CalendarData_*.java" -o -name "CalendarData_*.properties") -# Then translate the locale files into for example: FormatData_sv -LOCALE_RESOURCES:=$(sort $(subst .properties,,$(subst .java,,$(notdir $(LOCALE_FILES))))) +# Then translate the locale files into for example: FormatData_sv +LOCALE_RESOURCES := $(sort $(subst .properties,,$(subst .java,,$(notdir $(LOCALE_FILES))))) # Include the list of resources found during the previous compile. -include $(JDK_OUTPUTDIR)/gensrc/_the.locale_resources -MISSING_RESOURCES:=$(filter-out $(LOCALE_RESOURCES),$(PREV_LOCALE_RESOURCES)) -NEW_RESOURCES:=$(filter-out $(PREV_LOCALE_RESOURCES),$(LOCALE_RESOURCES)) +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/sun/util/locale/provider/LocaleDataMetaInfo.java) +ifneq (, $(MISSING_RESOURCES)$(NEW_RESOURCES)) + # There is a difference in the number of supported resources. Trigger a regeneration. + $(shell $(RM) $(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java) endif # The EN locales -EN_LOCALES:=en% +EN_LOCALES := en% # ja-JP-JP and th-TH-TH need to be manually added, as they don't have any resource files. -ALL_NON_EN_LOCALES:=ja-JP-JP th-TH-TH +ALL_NON_EN_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' +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_ENLocales# with: en% locales. define CaptureLocale - $1_LOCALES := $$(subst _,-,$$(filter-out $1,$$(subst $1_,,$$(filter $1_%,$(LOCALE_RESOURCES))))) - $1_EN_LOCALES := $$(filter $(EN_LOCALES),$$($1_LOCALES)) - $1_NON_EN_LOCALES := $$(filter-out $(EN_LOCALES),$$($1_LOCALES)) + $1_LOCALES := $$(subst _,-,$$(filter-out $1, $$(subst $1_,,$$(filter $1_%, $(LOCALE_RESOURCES))))) + $1_EN_LOCALES := $$(filter $(EN_LOCALES), $$($1_LOCALES)) + $1_NON_EN_LOCALES := $$(filter-out $(EN_LOCALES), $$($1_LOCALES)) - ALL_EN_LOCALES += $$($1_EN_LOCALES) - ALL_NON_EN_LOCALES += $$($1_NON_EN_LOCALES) + ALL_EN_LOCALES += $$($1_EN_LOCALES) + ALL_NON_EN_LOCALES += $$($1_NON_EN_LOCALES) - # Don't sed in a space if there are no locales. - SED_ARGS+= -e 's/$$(HASH)$1_ENLocales$$(HASH)/$$(if $$($1_EN_LOCALES),$$(SPACE)$$($1_EN_LOCALES),)/g' - SED_ARGS+= -e 's/$$(HASH)$1_NonENLocales$$(HASH)/$$(if $$($1_NON_EN_LOCALES),$$(SPACE)$$($1_NON_EN_LOCALES),)/g' + # Don't sed in a space if there are no locales. + SED_ARGS += -e 's/$$(HASH)$1_ENLocales$$(HASH)/$$(if $$($1_EN_LOCALES),$$(SPACE)$$($1_EN_LOCALES),)/g' + SED_ARGS += -e 's/$$(HASH)$1_NonENLocales$$(HASH)/$$(if $$($1_NON_EN_LOCALES),$$(SPACE)$$($1_NON_EN_LOCALES),)/g' endef #sun.text.resources.FormatData @@ -91,17 +91,17 @@ #sun.util.resources.CalendarData $(eval $(call CaptureLocale,CalendarData)) -SED_ARGS+= -e 's/$(HASH)AvailableLocales_ENLocales$(HASH)/$(sort $(ALL_EN_LOCALES))/g' -SED_ARGS+= -e 's/$(HASH)AvailableLocales_NonENLocales$(HASH)/$(sort $(ALL_NON_EN_LOCALES))/g' +SED_ARGS += -e 's/$(HASH)AvailableLocales_ENLocales$(HASH)/$(sort $(ALL_EN_LOCALES))/g' +SED_ARGS += -e 's/$(HASH)AvailableLocales_NonENLocales$(HASH)/$(sort $(ALL_NON_EN_LOCALES))/g' $(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java: \ - $(JDK_TOPDIR)/src/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template + $(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/_the.locale_resources $(SED) $(SED_ARGS) $< > $@ -GENSRC_LOCALEDATAMETAINFO:=$(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java +GENSRC_LOCALEDATAMETAINFO := $(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java ### @@ -110,10 +110,10 @@ JRE_NONEXIST_LOCALES := en en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR sv_SE zh -$(GENSRC_CRBC_DST) : $(JDK_TOPDIR)/src/share/classes/sun/util/CoreResourceBundleControl-XLocales.java.template \ - $(GENSRC_CRBC_CMD) +$(GENSRC_CRBC_DST): $(JDK_TOPDIR)/src/share/classes/sun/util/CoreResourceBundleControl-XLocales.java.template \ + $(GENSRC_CRBC_CMD) $(MKDIR) -p $(@D) - NAWK="$(NAWK)" SED="$(SED)" $(SH) $(GENSRC_CRBC_CMD) "$(JRE_NONEXIST_LOCALES)" $< $@ + NAWK="$(NAWK)" SED="$(SED)" $(SH) $(GENSRC_CRBC_CMD) "$(JRE_NONEXIST_LOCALES)" $< $@ GENSRC_LOCALEDATAMETAINFO += $(GENSRC_CRBC_DST)