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

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

grep 2.5: make install does not honor prefix or suffix for egrep/ fgrep


From: Newton, Philip
Subject: grep 2.5: make install does not honor prefix or suffix for egrep/ fgrep
Date: Wed, 8 Jan 2003 15:33:59 +0100

Hi,

I recently installed grep 2.5 which I had configured with
--program-prefix=gnu in order to have "gnugrep" rather than "grep" (which
would still be the grep that comes with the OS).

However, I found that /usr/local/bin, after `make install`, contained two
dangling symbolic links: egrep and fgrep, both pointing to "grep" -- but
there was no "grep" there, only "gnugrep". I would have expected the
programs to be "gnuegrep" and "gnufgrep" (as indeed happened with grep 2.3
which I had installed on another machine three years ago -- but there they
were they three separate programs rather than one binary with two symbolic
links).

The culprit appears to be the make target 'install-exec-local'.

The target 'install-exec-am' has as dependencies 'install-binPROGRAMS' and
'install-exec-local', which don't treat their arguments the same;
install-binPROGRAMS creates program names with sed and $(transform) and uses
$(INSTALL_PROGRAM) to copy the files under the new name, while
install-exec-local simply does

<quote>
install-exec-local:
        ln -s grep $(bindir)/egrep
        ln -s grep $(bindir)/fgrep
</quote>

without regard for the name that 'grep' was actually installed as
("gnugrep", in this case -- but one could also have used --program-suffix or
--program-transform-name to create "grep.gnu" or "grop" or whatever).

I consider this a bug.

I deleted the symbolic links and re-created them as 'gnuegrep' and
'gnufgrep', pointing to 'gnugrep'. However -- does that interfere with the
auto-detection that "egrep == grep -E, fgrep == grep -F"? I don't want to
hide the system egrep/fgrep, nor have to specify full path for either system
[ef]grep or GNU [ef]grep.

It used to work when they were separate programs but now that it's one
program that pays attention to its name, I suppose it's picky about what
it's called and won't accept "gnuegrep" as meaning "gnuegrep -E" any more.

Cheers,
Philip
-- 
Philip Newton <address@hidden>
All opinions are my own, not my employer's.
If you're not part of the solution, you're part of the precipitate.




reply via email to

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