Skip to contentSkip to conversation

MAKEALL: Fix case substitution for old bash

PATCH In review York Sun 3 participants 3 messages Mar 22, 2013 – Apr 3, 2013

lore
Share & tools
lore

York Sun

author
#0 lore raw

PATCH 1/1 MAKEALL: Fix case substitution for old bash

Bash ver 3.x doesn't support the parameter expansion with case substitution. Use tr instead.

---
Removed RFC from subject line.

 MAKEALL |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
MAKEALL +1 -1
index c1d8957..ac92ef6 100755
@@ -664,7 +664,7 @@ build_target() {
 	export BUILD_DIR="${output_dir}"
 
 	target_arch=$(get_target_arch ${target})
-	eval cross_toolchain=\$CROSS_COMPILE_${target_arch^^}
+	eval cross_toolchain=\$CROSS_COMPILE_`echo $target_arch | tr '[:lower:]' '[:upper:]'`
 	if [ "${cross_toolchain}" ] ; then
 	    MAKE="make CROSS_COMPILE=${cross_toolchain}"
 	elif [ "${CROSS_COMPILE}" ] ; then
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 MAKEALL: Fix case substitution for old bash

Quoted 4 lines · York Sun

Bash ver 3.x doesn't support the parameter expansion with case substitution. Use tr instead.

Quoted 23 lines

---
Removed RFC from subject line.

 MAKEALL |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
MAKEALL +1 -1
index c1d8957..ac92ef6 100755
@@ -664,7 +664,7 @@ build_target() {
 	export BUILD_DIR="${output_dir}"
 
 	target_arch=$(get_target_arch ${target})
-	eval cross_toolchain=\$CROSS_COMPILE_${target_arch^^}
+	eval cross_toolchain=\$CROSS_COMPILE_`echo $target_arch | tr '[:lower:]' '[:upper:]'`
 	if [ "${cross_toolchain}" ] ; then
 	    MAKE="make CROSS_COMPILE=${cross_toolchain}"
 	elif [ "${CROSS_COMPILE}" ] ; then
Signature · 1 line
1.7.9.5
Signature · 1 line
nvpublic
#2 lore raw
In reply to York Sun
Quoted 5 lines · York Sun

Bash ver 3.x doesn't support the parameter expansion with case substitution. Use tr instead.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130403/8c30982f/attachment.pgp>