* [PATCH v2 4/7] fortran: use grep instead of fgrep [not found] <fb82297845486b14d51905ae3df8dbba726fcf57.camel@xry111.site> @ 2022-06-27 6:10 ` Xi Ruoyao 2023-05-10 19:29 ` Bernhard Reutner-Fischer 0 siblings, 1 reply; 4+ messages in thread From: Xi Ruoyao @ 2022-06-27 6:10 UTC (permalink / raw) To: gcc-patches Cc: Rainer Orth, Arnaud Charlet, Bernhard Reutner-Fischer, Jonathan Wakely, fortran fgrep has been deprecated in favor of grep -F for a long time, and the next grep release (3.8 or 4.0) will print a warning of fgrep is used. Stop using fgrep so we won't see the warning. We can't hard code grep -F here or it may break build on hosts w/o GNU grep. autoconf documentation contains a warning about this issue and suggest to use AC_PROG_FGREP and $FGREP, but these are too overkill in the specific case: there is no way "debian" could be interpreted as an non-trivial regex, so we can use a plain grep here. gcc/fortran/ChangeLog: * Make-lang.in: Use grep instead of fgrep. --- gcc/fortran/Make-lang.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/fortran/Make-lang.in b/gcc/fortran/Make-lang.in index 1cb47cb1a52..6eb597d0ca0 100644 --- a/gcc/fortran/Make-lang.in +++ b/gcc/fortran/Make-lang.in @@ -278,7 +278,7 @@ $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext): doc/gfortran.1 \ -chmod a-x $@ fortran.uninstall: - if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ + if $(SHELL) -c 'install-info --version | sed 1q | grep -s -v -i debian' >/dev/null 2>&1; then \ echo " install-info --delete --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gfortran.info"; \ install-info --delete --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gfortran.info || : ; \ else : ; fi; \ -- 2.36.1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 4/7] fortran: use grep instead of fgrep 2022-06-27 6:10 ` [PATCH v2 4/7] fortran: use grep instead of fgrep Xi Ruoyao @ 2023-05-10 19:29 ` Bernhard Reutner-Fischer 2023-05-10 20:02 ` Thomas Koenig 0 siblings, 1 reply; 4+ messages in thread From: Bernhard Reutner-Fischer @ 2023-05-10 19:29 UTC (permalink / raw) To: Xi Ruoyao Cc: gcc-patches, Rainer Orth, Arnaud Charlet, Jonathan Wakely, fortran On Mon, 27 Jun 2022 14:10:36 +0800 Xi Ruoyao <xry111@xry111.site> wrote: > fgrep has been deprecated in favor of grep -F for a long time, and the > next grep release (3.8 or 4.0) will print a warning of fgrep is used. > Stop using fgrep so we won't see the warning. > > We can't hard code grep -F here or it may break build on hosts w/o GNU > grep. autoconf documentation contains a warning about this issue and > suggest to use AC_PROG_FGREP and $FGREP, but these are too overkill in > the specific case: there is no way "debian" could be interpreted as an > non-trivial regex, so we can use a plain grep here. LGTM but i cannot approve it. I'd say this one is trivial and obvious so you could sneak it in under the "obvious" rule.. Thanks for the patch! > > gcc/fortran/ChangeLog: > > * Make-lang.in: Use grep instead of fgrep. > --- > gcc/fortran/Make-lang.in | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/fortran/Make-lang.in b/gcc/fortran/Make-lang.in > index 1cb47cb1a52..6eb597d0ca0 100644 > --- a/gcc/fortran/Make-lang.in > +++ b/gcc/fortran/Make-lang.in > @@ -278,7 +278,7 @@ $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext): doc/gfortran.1 \ > -chmod a-x $@ > > fortran.uninstall: > - if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ > + if $(SHELL) -c 'install-info --version | sed 1q | grep -s -v -i debian' >/dev/null 2>&1; then \ > echo " install-info --delete --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gfortran.info"; \ > install-info --delete --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gfortran.info || : ; \ > else : ; fi; \ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 4/7] fortran: use grep instead of fgrep 2023-05-10 19:29 ` Bernhard Reutner-Fischer @ 2023-05-10 20:02 ` Thomas Koenig 2023-05-11 9:01 ` Pushed: " Xi Ruoyao 0 siblings, 1 reply; 4+ messages in thread From: Thomas Koenig @ 2023-05-10 20:02 UTC (permalink / raw) To: Bernhard Reutner-Fischer, Xi Ruoyao Cc: gcc-patches, Rainer Orth, Arnaud Charlet, Jonathan Wakely, fortran On 10.05.23 21:29, Bernhard Reutner-Fischer via Fortran wrote: > On Mon, 27 Jun 2022 14:10:36 +0800 > Xi Ruoyao <xry111@xry111.site> wrote: > >> fgrep has been deprecated in favor of grep -F for a long time, and the >> next grep release (3.8 or 4.0) will print a warning of fgrep is used. >> Stop using fgrep so we won't see the warning. >> >> We can't hard code grep -F here or it may break build on hosts w/o GNU >> grep. autoconf documentation contains a warning about this issue and >> suggest to use AC_PROG_FGREP and $FGREP, but these are too overkill in >> the specific case: there is no way "debian" could be interpreted as an >> non-trivial regex, so we can use a plain grep here. > > LGTM but i cannot approve it. I'd say this one is trivial and obvious > so you could sneak it in under the "obvious" rule.. I concur, this could also have been obvious. Anyway, OK for trunk, and > Thanks for the patch! ^ permalink raw reply [flat|nested] 4+ messages in thread
* Pushed: [PATCH v2 4/7] fortran: use grep instead of fgrep 2023-05-10 20:02 ` Thomas Koenig @ 2023-05-11 9:01 ` Xi Ruoyao 0 siblings, 0 replies; 4+ messages in thread From: Xi Ruoyao @ 2023-05-11 9:01 UTC (permalink / raw) To: Thomas Koenig, Bernhard Reutner-Fischer Cc: gcc-patches, Rainer Orth, Arnaud Charlet, Jonathan Wakely, fortran On Wed, 2023-05-10 at 22:02 +0200, Thomas Koenig wrote: > On 10.05.23 21:29, Bernhard Reutner-Fischer via Fortran wrote: > > On Mon, 27 Jun 2022 14:10:36 +0800 > > Xi Ruoyao <xry111@xry111.site> wrote: > > > > > fgrep has been deprecated in favor of grep -F for a long time, and the > > > next grep release (3.8 or 4.0) will print a warning of fgrep is used. > > > Stop using fgrep so we won't see the warning. > > > > > > We can't hard code grep -F here or it may break build on hosts w/o GNU > > > grep. autoconf documentation contains a warning about this issue and > > > suggest to use AC_PROG_FGREP and $FGREP, but these are too overkill in > > > the specific case: there is no way "debian" could be interpreted as an > > > non-trivial regex, so we can use a plain grep here. > > > > LGTM but i cannot approve it. I'd say this one is trivial and obvious > > so you could sneak it in under the "obvious" rule.. > > I concur, this could also have been obvious. > > Anyway, OK for trunk, and > > > Thanks for the patch! Pushed r14-698, with a commit msg change for the status of grep release. -- Xi Ruoyao <xry111@xry111.site> School of Aerospace Science and Technology, Xidian University ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-11 9:02 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <fb82297845486b14d51905ae3df8dbba726fcf57.camel@xry111.site> 2022-06-27 6:10 ` [PATCH v2 4/7] fortran: use grep instead of fgrep Xi Ruoyao 2023-05-10 19:29 ` Bernhard Reutner-Fischer 2023-05-10 20:02 ` Thomas Koenig 2023-05-11 9:01 ` Pushed: " Xi Ruoyao
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).