8003177: build-infra: Compare reports diff in LocaleDataMetaInfo.class
authortbell
Mon, 12 Nov 2012 10:49:44 -0800
changeset 14427 8b159b688292
parent 14426 2f6942e2316a
child 14428 cacd70dfb133
8003177: build-infra: Compare reports diff in LocaleDataMetaInfo.class Summary: Remove spurious space in the locale lists Reviewed-by: naoto, ohair, tbell Contributed-by: erik.joelsson@oracle.com
jdk/makefiles/GensrcLocaleDataMetaInfo.gmk
--- a/jdk/makefiles/GensrcLocaleDataMetaInfo.gmk	Mon Nov 12 10:20:01 2012 -0800
+++ b/jdk/makefiles/GensrcLocaleDataMetaInfo.gmk	Mon Nov 12 10:49:44 2012 -0800
@@ -68,8 +68,9 @@
     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