From: Jeroen Hofstee <dasuboot@myspectrum.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] mkconfig: create CONFIG_ defines without relying on GNU extensions
Date: Wed, 20 Jul 2011 00:05:26 +0200 [thread overview]
Message-ID: <4E25FFA6.9090706@myspectrum.nl> (raw)
In-Reply-To: <CAJaTeTqE0JBAdfaQNzZPnUXEb12VQ_3b+iWgvKAW+XYg7J36eA@mail.gmail.com>
Hi Mike,
>> Won't work on FreeBSD since it can't quite early [afaik] (perhaps with a
>> label, but gets rather ugly..)
>>
>> [jeroen at blue ~]$ echo configflag | sed -e '/=/{s/=/\t/;q}' -e 's/$/\t1/'
>> sed: 1: "/=/{s/=/\t/;q}
>> ": extra characters at the end of q command
> i'm not sure you've diagnosed the problem correctly. the fact that
> the output says "end of q command" indicates that FreeBSD does support
> the "q" command (as required by POSIX).
>
I didn't apparently..
> perhaps the problem is that the ";" extension to separating commands
> (which is not in POSIX afaics) does not work the same in FreeBSD's sed
> as GNU's sed. i imagine if you stick a ";" after the "q" command
> it'll work ...
>
> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html
> -mike
Yes, the ; does work as expected, thanks!
[jeroen at blue ~]$ echo config | sed -e '/=/{s/=/ /;q;}' -e 's/$/ 1/'
config 1
[jeroen at blue ~]$ echo config=2 | sed -e '/=/{s/=/ /;q;}' -e 's/$/ 1/'
config 2
Shall change the patch accordingly tomorrow.
Regards,
Jeroen
next prev parent reply other threads:[~2011-07-19 22:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-19 20:41 [U-Boot] [PATCH 0/3] improve build for UNIX like non GNU platforms Jeroen Hofstee
2011-07-19 20:41 ` [U-Boot] [PATCH 1/3] include/compiler.h: typedef ulong for FreeBSD Jeroen Hofstee
2011-07-28 19:17 ` Wolfgang Denk
2011-07-19 20:41 ` [U-Boot] [PATCH 2/3] mkconfig: create CONFIG_ defines without relying on GNU extensions Jeroen Hofstee
2011-07-19 21:03 ` Mike Frysinger
2011-07-19 21:28 ` Jeroen Hofstee
2011-07-19 21:38 ` Mike Frysinger
2011-07-19 22:05 ` Jeroen Hofstee [this message]
2011-07-19 22:57 ` Marek Vasut
2011-07-19 23:03 ` Mike Frysinger
2011-07-19 23:09 ` Jeroen Hofstee
2011-07-19 20:41 ` [U-Boot] [PATCH 3/3] rules.mk: replace GNU specific \w with POSIX equivalant Jeroen Hofstee
2011-07-28 19:18 ` Wolfgang Denk
2011-07-20 18:38 ` [U-Boot] [PATCH v2 0/3] improve build for UNIX like non GNU platforms Jeroen Hofstee
2011-07-20 18:38 ` [U-Boot] [PATCH v2 3/3] mkconfig: also create CONFIG defines with BSD sed Jeroen Hofstee
2011-07-20 20:08 ` Mike Frysinger
2011-07-28 19:18 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E25FFA6.9090706@myspectrum.nl \
--to=dasuboot@myspectrum.nl \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox