From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id BBCD4386F0D2; Fri, 24 Jun 2022 12:22:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BBCD4386F0D2 Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 228AF669E7; Fri, 24 Jun 2022 08:22:43 -0400 (EDT) Message-ID: <09114af24f7f09eb2fa6c7dc743de18480d8bd7d.camel@xry111.site> Subject: Re: [PATCH 6/8] fortran: use grep -F instead of fgrep From: Xi Ruoyao To: Bernhard Reutner-Fischer , Rainer Orth Cc: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Date: Fri, 24 Jun 2022 20:22:42 +0800 In-Reply-To: <20220624131331.0b157480@nbbrfq> References: <74ea0c62ebe19db186263053e4051f81d46e9da4.camel@xry111.site> <3fe5664607c4e530fbb91048c2e363ddee917250.camel@xry111.site> <20220624131331.0b157480@nbbrfq> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.2 MIME-Version: 1.0 X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FROM_SUSPICIOUS_NTLD, LIKELY_SPAM_FROM, PDS_OTHER_BAD_TLD, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2022 12:22:48 -0000 On Fri, 2022-06-24 at 13:13 +0200, Bernhard Reutner-Fischer wrote: > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if $(SHELL) -c 'install-info= --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if $(SHELL) -c 'install-info= --version | sed 1q | grep -F -s -v -i debian' >/dev/null 2>&1; then \ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 echo " install-i= nfo --delete --info-dir=3D$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gfortra= n.info"; \ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 install-info --d= elete --info-dir=3D$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gfortran.info = || : ; \ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0else : ; fi; \ >=20 > I'd replace -s >/dev/null 2>&1 with -q while at it. >=20 > But why is -F used here in the first place? > I do not see much in debian that can be interpreted as a regex? I'm not sure. It was there since 2004. Perhaps the author thinks fgrep may save several CPU cycles :). I'll just use a plain grep in PATCH v2. Rainer: do you have some idea about the availability of "-q" on different hosts? If you agree I'll use it instead of -s > /dev/null too. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University