From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 20 Jul 2011 00:57:58 +0200 Subject: [U-Boot] [PATCH 2/3] mkconfig: create CONFIG_ defines without relying on GNU extensions In-Reply-To: <1311108110-37409-3-git-send-email-jeroen@myspectrum.nl> References: <1311108110-37409-1-git-send-email-jeroen@myspectrum.nl> <1311108110-37409-3-git-send-email-jeroen@myspectrum.nl> Message-ID: <201107200057.58325.marek.vasut@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday, July 19, 2011 10:41:49 PM Jeroen Hofstee wrote: > Parsing of boards.cfg relies on sed GNU extensions and fails if sed > doesn't support these. On FreeBSD this leads to the error: > > sed: 1: "/=/ {s/=/\t/;q } ; { s/ ...": extra characters at the end > of q command Does it still work on linux as well? Did you test? If so, I'm all for it being merged, but just from a brief look, I see it'll be missing the TAB. Am I right? > > Signed-off-by: Jeroen Hofstee > Cc: Marek Vasut > --- > mkconfig | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/mkconfig b/mkconfig > index 6ff533f..b9cfc94 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 -e '/=/!s/$/=1/' -e 's/=/ /'`" > echo "#define CONFIG_${i}" >>config.h ; > done