diff mbox

[U-Boot,v2,1/4] MAKEALL: fix awk warning message

Message ID 1382321488-16449-2-git-send-email-yamada.m@jp.panasonic.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Masahiro Yamada Oct. 21, 2013, 2:11 a.m. UTC
If you do `./MAKEALL -M ` or `./MAKEALL -m`
GNU awk would display warnings like follows:

    awk: warning: escape sequence `\ ' treated as plain ` '

In the first place, we do not explicitly set the field separator.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
---

Changes for v2:
  - No change

Note:
I confirmed the warning message:
    awk: warning: escape sequence `\ ' treated as plain ` '
on Ubuntu 12.04 LTS and Ubuntu 13.04


 MAKEALL | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Tom Rini Nov. 8, 2013, 10:28 p.m. UTC | #1
On Mon, Oct 21, 2013 at 11:11:25AM +0900, Masahiro Yamada wrote:

> If you do `./MAKEALL -M ` or `./MAKEALL -m`
> GNU awk would display warnings like follows:
> 
>     awk: warning: escape sequence `\ ' treated as plain ` '
> 
> In the first place, we do not explicitly set the field separator.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/MAKEALL b/MAKEALL
index a9253d3..b035229 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -518,7 +518,7 @@  get_target_location() {
 	local vendor=""
 
 	# Automatic mode
-	local line=`awk -F '\ +' '\$7 == "'"$target"'" { print \$0 }' boards.cfg`
+	local line=`awk '\$7 == "'"$target"'" { print \$0 }' boards.cfg`
 	if [ -z "${line}" ] ; then echo "" ; return ; fi
 
 	set ${line}
@@ -556,7 +556,7 @@  get_target_location() {
 get_target_maintainers() {
 	local name=`echo $1 | cut -d : -f 3`
 
-	local line=`awk -F '\ +' '\$7 == "'"$target"'" { print \$0 }' boards.cfg`
+	local line=`awk '\$7 == "'"$target"'" { print \$0 }' boards.cfg`
 	if [ -z "${line}" ]; then
 		echo ""
 		return ;