diff --git a/makefiles/GensrcLocaleDataMetaInfo.gmk b/makefiles/GensrcLocaleDataMetaInfo.gmk index ab5a39abf9954af5b4581c9fffa7856b41744ab3..306276adf5949e45a13ff56190060569f8214ee5 100644 --- a/makefiles/GensrcLocaleDataMetaInfo.gmk +++ b/makefiles/GensrcLocaleDataMetaInfo.gmk @@ -68,8 +68,9 @@ define CaptureLocale ALL_US_LOCALES += $$($1_US_LOCALES) ALL_NON_US_LOCALES += $$($1_NON_US_LOCALES) - SED_ARGS+= -e 's/$$(HASH)$1_USLocales$$(HASH)/ $$($1_US_LOCALES)/g' - SED_ARGS+= -e 's/$$(HASH)$1_NonUSLocales$$(HASH)/ $$($1_NON_US_LOCALES)/g' + # Don't sed in a space if there are no locales. + SED_ARGS+= -e 's/$$(HASH)$1_USLocales$$(HASH)/$$(if $$($1_US_LOCALES),$$(SPACE)$$($1_US_LOCALES),)/g' + SED_ARGS+= -e 's/$$(HASH)$1_NonUSLocales$$(HASH)/$$(if $$($1_NON_US_LOCALES),$$(SPACE)$$($1_NON_US_LOCALES),)/g' endef #sun.text.resources.FormatData