Patchwork [U-Boot,v2,3/3] mkconfig: also create CONFIG defines with BSD sed

login
register
mail settings
Submitter Jeroen Hofstee
Date July 20, 2011, 6:38 p.m.
Message ID <1311187101-6229-2-git-send-email-jeroen@myspectrum.nl>
Download mbox | patch
Permalink /patch/105780/
State Accepted
Commit 2901f8891d3d0a17b42c870947ab801d833d569e
Headers show

Comments

Jeroen Hofstee - July 20, 2011, 6:38 p.m.
Parsing of boards.cfg fails on FreeBSD with the error:

sed: 1: "/=/ {s/=/\t/;q } ; { s/ ...": extra characters at the end
of q command

BSD sed expects commands to be on seperate 'lines', hence it expects
an additional ; before the closing brackets.
BSD sed does not support \t, replaced by literal tab.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Cc: Marek Vasut <marek.vasut@gmail.com>
---
 mkconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Mike Frysinger - July 20, 2011, 8:08 p.m.
On Wed, Jul 20, 2011 at 14:38, Jeroen Hofstee wrote:
> Parsing of boards.cfg fails on FreeBSD with the error:
>
> sed: 1: "/=/ {s/=/\t/;q } ; { s/ ...": extra characters at the end
> of q command
>
> BSD sed expects commands to be on seperate 'lines', hence it expects
> an additional ; before the closing brackets.
> BSD sed does not support \t, replaced by literal tab.

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
Wolfgang Denk - July 28, 2011, 7:18 p.m.
Dear Jeroen Hofstee,

In message <1311187101-6229-2-git-send-email-jeroen@myspectrum.nl> you wrote:
> Parsing of boards.cfg fails on FreeBSD with the error:
> 
> sed: 1: "/=/ {s/=/\t/;q } ; { s/ ...": extra characters at the end
> of q command
> 
> BSD sed expects commands to be on seperate 'lines', hence it expects
> an additional ; before the closing brackets.
> BSD sed does not support \t, replaced by literal tab.
> 
> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
> Cc: Marek Vasut <marek.vasut@gmail.com>
> ---
>  mkconfig |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/mkconfig b/mkconfig
index 6ff533f..ecb6d4e 100755
--- a/mkconfig
+++ b/mkconfig
@@ -148,7 +148,7 @@  fi
 echo "/* Automatically generated - do not edit */" >>config.h
 
 for i in ${TARGETS} ; do
-	i="`echo ${i} | sed '/=/ {s/=/\t/;q } ; { s/$/\t1/ }'`"
+	i="`echo ${i} | sed '/=/ {s/=/	/;q; } ; { s/$/	1/; }'`"
 	echo "#define CONFIG_${i}" >>config.h ;
 done