6482445: j2se/make/java/java/localegen.sh uses 'sort' from PATH, could get system32/sort
authorohair
Mon, 31 Mar 2008 17:19:06 -0700
changeset 306 d0cc9302b27e
parent 305 9b905a071b0e
child 307 18015b31ef73
6482445: j2se/make/java/java/localegen.sh uses 'sort' from PATH, could get system32/sort Summary: Making sure the right 'sort' utility is found. Reviewed-by: tbell
jdk/make/java/java/genlocales.gmk
jdk/make/java/java/localegen.sh
--- a/jdk/make/java/java/genlocales.gmk	Mon Mar 31 17:17:18 2008 -0700
+++ b/jdk/make/java/java/genlocales.gmk	Mon Mar 31 17:19:06 2008 -0700
@@ -80,7 +80,8 @@
 	@$(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) $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \
+	NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \
+	     $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \
 		$@.tmp.noneuro $< $@
 	@$(RM) $@.tmp.euro $@.tmp.noneuro;
 	
--- a/jdk/make/java/java/localegen.sh	Mon Mar 31 17:17:18 2008 -0700
+++ b/jdk/make/java/java/localegen.sh	Mon Mar 31 17:19:06 2008 -0700
@@ -29,7 +29,7 @@
 # This script is to generate the supported locale list string and replace the
 # LocaleDataMetaInfo-XLocales.java in <ws>/src/share/classes/sun/util
 # 
-# NAWK & SED is passed in as environment variables.
+# SORT, NAWK & SED is passed in as environment variables.
 #
 
 # A list of resource base name list;
@@ -47,7 +47,7 @@
 localelist=
 getlocalelist() {
     localelist=""
-    localelist=`$NAWK -F$1_ '{print $2}' $2 | sort`
+    localelist=`$NAWK -F$1_ '{print $2}' $2 | $SORT`
 }
 
 sed_script="$SED -e \"s@^#warn .*@// -- This file was mechanically generated: Do not edit! -- //@\" "