bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Symlink installation of grep/fgrep in grep 2.5


From: Albert Chin-A-Young
Subject: Re: Symlink installation of grep/fgrep in grep 2.5
Date: Mon, 18 Mar 2002 09:03:05 -0600
User-agent: Mutt/1.2.5i

On Mon, Mar 18, 2002 at 12:24:57AM -0800, Paul Eggert wrote:
> > From: Albert Chin-A-Young <address@hidden>
> > Date: Mon, 18 Mar 2002 00:42:46 -0600
> > 
> > The creation of the symbolic link from fgrep/egrep -> grep does not
> > honor --program-prefix or --program-transform-name. The patch below
> > fixes this.
> 
> The symbolic link also violates the GNU coding standards, and fixing
> that problem also fixes your problem.  Please see:
> 
> http://mail.gnu.org/pipermail/bug-gnu-utils/2002-March/009752.html

Your patch to src/Makefile.am doesn't take $(transform) into
consideration. Something like the following will work:

--- src/Makefile.am.orig        Sun Mar 17 23:51:48 2002
+++ src/Makefile.am     Mon Mar 18 08:57:47 2002
@@ -17,6 +17,12 @@
              dosbuf.c \
              vms_fab.c vms_fab.h
 
-install-exec-local:
-       @SYMLINK@ @SYMLINKFROM@ $(bindir)/egrep
-       @SYMLINK@ @SYMLINKFROM@ $(bindir)/fgrep
+egrep:
+       echo '#! /bin/sh' >$@
+       echo 'exec '`echo grep|sed '$(transform)'`' -E $${1+"$$@"}' >>$@
+       chmod a+x $@
+
+fgrep:
+       echo '#! /bin/sh' >$@
+       echo 'exec '`echo grep|sed '$(transform)'`' -F $${1+"$$@"}' >>$@
+       chmod a+x $@

-- 
albert chin (address@hidden)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]