* On Thursday 2005-06-23 at 08:30:48 -0300, Tony Abou-Assaleh wrote: > Would it make sense to add switches to the configuration script that would > determine how egrep/fgrep are installed? Current option seem to be: > > 1) don't install (should use grep -E/F) > 2) install wrapper (what we do now) > 3) install symlinks (since against GNU standards, should not be default) > 4) make them all binaries > > For option 4, we would need to add defines to the source so that the > operation of the binary doesn't depend on the name, but that different > binaries are actually compiled.
I don't know. I'm not a big fan of anything else but the wrapper script approach. Within that option, the question is whether to hardcode the bindir path. E.g., /usr/bin/grep /usr/bin/fgrep execs "/usr/bin/grep -F" /usr/beta/bin/grep /usr/beta/bin/fgrep execs "/usr/beta/bin/grep -F" I checked what we now have in CVS: <http://savannah.gnu.org/cgi-bin/viewcvs/grep/grep/src/Makefile.am.diff?r1=1.31&r2=1.32> with this construct: dir=${0%/*}/ which isn't too bad, but has the following disadvantages: -- The % thing is not too portable. -- Should for some reason /usr/bin/fgrep be copied elsewhere or symlinked to, it will fail to set dir=/usr/bin/ anymore. (That would remain the case if sed were used instead of the % construct.)