From: Jonathan Wakely <email@example.com>
To: Xi Ruoyao <firstname.lastname@example.org>
Cc: Jonathan Wakely <email@example.com>,
Rainer Orth <firstname.lastname@example.org>
Subject: Re: [PATCH 3/8] libstdc++: use grep -E instead of egrep in scripts
Date: Fri, 24 Jun 2022 12:35:22 +0100 [thread overview]
Message-ID: <CACb0b4=FwHipvizvqkzWtjbAs6AELpOS_jU8boR81ndU7tnx6g@mail.gmail.com> (raw)
On Fri, 24 Jun 2022 at 12:18, Jonathan Wakely <email@example.com> wrote:
> On Fri, 24 Jun 2022 at 12:08, Xi Ruoyao via Libstdc++
> <firstname.lastname@example.org> wrote:
> > On Fri, 2022-06-24 at 11:00 +0100, Jonathan Wakely wrote:
> > > On Fri, 24 Jun 2022 at 08:03, Xi Ruoyao via Libstdc++
> > > <email@example.com> wrote:
> > > >
> > > > egrep has been deprecated in favor of grep -E for a long time, and
> > > > the
> > > > next grep release (3.8 or 4.0) will print a warning of egrep is
> > > > used.
> > > > Stop using egrep so we won't see the warning.
> > > >
> > > > libstdc++-v3/ChangeLog:
> > > >
> > > > * scripts/extract_symvers.in: Use grep -E instead of egrep.
> > > > * libstdc++-v3/scripts/run_doxygen: Likewise.
> > >
> > > This should be just scripts/run_doxygen here. You can use the git
> > > gcc-verify alias to check your changelog format.
> > >
> > >
> > > With that fixed it's OK for trunk and gcc-12 and gcc-11 branches,
> > > thanks!
> > I'll need some rework as Rainer told me "grep -E" may not work on some
> > Solaris systems w/o GNU grep, and the code snippet in extract_symvers.in
> > is exactly for Solaris...
> I checked that, and it's not :-)
> The egrep uses in extract_symvers.in are for everything *except*
> SunOS. For Solaris we use the scripts/extract_symvers.pl script
> Your change might break generation of Doxygen API docs on Solaris, but
> maybe we can live with that.
/usr/xpg4/bin/grep supports the -E flag, so I was going to say that
it's acceptable to require that version in the PATH when generating
the API docs with doxygen. But in fact that script already assumes GNU
grep anyway, using egrep --files-without-match and POSIX grep does not
support --files-without-match, or the short form of that option, -L.
And in fact, neither of the uses of egrep in scripts/run_doxygen
actually needs to use extended regular expressions. Plain ol' grep
with Basic Regular Expressions will work fine:
problematic=`egrep -l '#include <.*h>' [a-z]*.3`
problematic=`egrep --files-without-match '^\.SH SYNOPSIS' [A-Z]*.3`
There are no ERE special characters here, so itcould just use 'grep'
not 'egrep'. And it won't work with Solaris grep anyway.
next prev parent reply other threads:[~2022-06-24 11:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <firstname.lastname@example.org>
2022-06-24 7:02 ` Xi Ruoyao
2022-06-24 10:00 ` Jonathan Wakely
2022-06-24 11:08 ` Xi Ruoyao
2022-06-24 11:18 ` Jonathan Wakely
2022-06-24 11:35 ` Jonathan Wakely [this message]
2022-06-24 11:41 ` Rainer Orth
2022-06-24 12:37 ` Xi Ruoyao
2022-06-24 12:38 ` Jonathan Wakely
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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 read-only IMAP folder(s) and NNTP newsgroup(s).