Re: Support building in a different directory on Solaris - Mailing list pgsql-patches

From Peter Eisentraut
Subject Re: Support building in a different directory on Solaris
Date
Msg-id Pine.LNX.4.30.0108102356410.703-100000@peter.localdomain
Whole thread Raw
In response to Re: Support building in a different directory on Solaris  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Support building in a different directory on Solaris
Re: Support building in a different directory on Solaris
List pgsql-patches
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


pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Support building in a different directory on Solaris
Next
From: Ian Lance Taylor
Date:
Subject: Re: Support building in a different directory on Solaris