Tom Lane writes:
> Ian Lance Taylor <ian@airs.com> writes:
> > the test built in to /bin/sh does not support -ef, although
> > /usr/bin/test does support it.
>
> Rather than assuming a test with -ef is available, ISTM the portable
> answer is not to depend on it at all. Why not forget the whole thing
> and use something like
>
> if [ `cd "$srcdir" ; /bin/pwd` = `/bin/pwd` ] ; then : ; else
That doesn't work in some setups; that's why we have what we have now.
The problem is that this test would actually evaluate to "not equal" and
the prep_buildtree would run on top of the source tree. Ugh.
Another way to find out if you're in the source tree might be to use
something like
test -f configure
but that's of course less than 100% positive. Ian, you seem to use this a
lot; any ideas?
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter