From: Peter Maydell <peter.maydell@linaro.org>
To: marcandre.lureau@redhat.com
Cc: qemu-devel@nongnu.org, "Daniel P. Berrangé" <berrange@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Markus Armbruster" <armbru@redhat.com>,
"Ed Maste" <emaste@freebsd.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Cornelia Huck" <cohuck@redhat.com>,
"Eric Farman" <farman@linux.ibm.com>,
"John Snow" <jsnow@redhat.com>,
"Halil Pasic" <pasic@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>,
"Thomas Huth" <thuth@redhat.com>,
"Cleber Rosa" <crosa@redhat.com>,
"Beraldo Leal" <bleal@redhat.com>,
"Li-Wen Hsu" <lwhsu@freebsd.org>,
"David Hildenbrand" <david@redhat.com>,
kraxel@redhat.com,
"Richard Henderson" <richard.henderson@linaro.org>,
qemu-s390x@nongnu.org,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Michael Roth" <michael.roth@amd.com>
Subject: Re: [PATCH v2 3/5] configure: replace Perl usage with sed
Date: Mon, 9 Jan 2023 18:42:57 +0000 [thread overview]
Message-ID: <CAFEAcA9H+V2GL=4ajLWr6gt5H7PoAaeokBmEH8TDbEDPFTTR1w@mail.gmail.com> (raw)
In-Reply-To: <20230109181447.235989-4-marcandre.lureau@redhat.com>
On Mon, 9 Jan 2023 at 18:16, <marcandre.lureau@redhat.com> wrote:
>
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Let's try to reduce our Perl usage during config/build-time.
>
> Note: this patch might be dropped if "configure: remove
> backwards-compatibility code" is merged earlier.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> configure | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/configure b/configure
> index 2281892657..e45acde404 100755
> --- a/configure
> +++ b/configure
> @@ -2571,11 +2571,9 @@ else
> if test -f meson-private/cmd_line.txt; then
> # Adjust old command line options whose type was changed
> # Avoids having to use "setup --wipe" when Meson is upgraded
> - perl -i -ne '
> - s/^gettext = true$/gettext = auto/;
> - s/^gettext = false$/gettext = disabled/;
> - /^b_staticpic/ && next;
> - print;' meson-private/cmd_line.txt
> + sed -i.bak 's/^gettext = true/gettext = auto/g' -e \
> + 's/^gettext = false/gettext = disabled/g' -e \
> + '/^b_staticpic/d' meson-private/cmd_line.txt
This doesn't work on macos sed, because POSIX sed allows
sed command file
or
sed -e command -e command file
but not
sed command -e command file
The fix is easy, prefix the first command with '-e'.
-i is not POSIX sed, but luckily the BSD sed implements it.
The two gettext matches have lost the trailing '$' in the regex.
thanks
-- PMM
next prev parent reply other threads:[~2023-01-09 18:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 18:14 [PATCH v2 0/5] Fix win32/msys2 shader compilation & drop perl marcandre.lureau
2023-01-09 18:14 ` [PATCH v2 1/5] build-sys: fix crlf-ending C code marcandre.lureau
2023-01-09 19:02 ` John Snow
2023-01-09 18:14 ` [PATCH v2 2/5] .gitlab-ci.d/windows: do not disable opengl marcandre.lureau
2023-01-09 18:14 ` [PATCH v2 3/5] configure: replace Perl usage with sed marcandre.lureau
2023-01-09 18:42 ` Peter Maydell [this message]
2023-01-09 18:14 ` [PATCH v2 4/5] meson: replace Perl usage with Python marcandre.lureau
2023-01-09 18:51 ` Peter Maydell
2023-01-09 18:55 ` Marc-André Lureau
2023-01-09 18:14 ` [PATCH v2 5/5] Draft: Update lcitool marcandre.lureau
2023-01-09 18:27 ` Daniel P. Berrangé
2023-01-09 18:30 ` Marc-André Lureau
2023-01-09 18:42 ` Daniel P. Berrangé
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='CAFEAcA9H+V2GL=4ajLWr6gt5H7PoAaeokBmEH8TDbEDPFTTR1w@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=bleal@redhat.com \
--cc=borntraeger@linux.ibm.com \
--cc=cohuck@redhat.com \
--cc=crosa@redhat.com \
--cc=david@redhat.com \
--cc=emaste@freebsd.org \
--cc=farman@linux.ibm.com \
--cc=jsnow@redhat.com \
--cc=kraxel@redhat.com \
--cc=lwhsu@freebsd.org \
--cc=marcandre.lureau@redhat.com \
--cc=michael.roth@amd.com \
--cc=pasic@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
--cc=wainersm@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).