Re: Support building in a different directory on Solaris

From: Ian Lance Taylor <ian(at)airs(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Support building in a different directory on Solaris
Date: 2001-09-07 17:00:15
Message-ID: siy9nrkkbk.fsf@daffy.airs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:

> Bruce Momjian writes:
>
> > Your patch has been added to the PostgreSQL unapplied patches list at:
> >
> > http://candle.pha.pa.us/cgi-bin/pgpatches
> >
> > I will try to apply it within the next 48 hours.
>
> No way. We should not run prep_buildtree on top of the source tree.
> There were a number of better solutions proposed.

Note that this patch normally will not run prep_buildtree on top of
the source tree. That would only happen in exceptional circumstances
in which /bin/pwd did not return the same string in the same
directory. I wrote the patch to address Tom Lane's suggestion of not
requiring test to support the relatively new -ef option.

But, as I said, I don't really care which patch is used.

Ian

> > > Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > >
> > > > Your patch has been added to the PostgreSQL unapplied patches list at:
> > > >
> > > > http://candle.pha.pa.us/cgi-bin/pgpatches
> > > >
> > > > I will try to apply it within the next 48 hours.
> > >
> > > Thanks. There was some discussion of a slightly different patch to
> > > address this by removing the requirement for test -ef. I've appended
> > > a patch for that; it has not been tested as well as my previous patch.
> > > I'm agnostic as to which one is used.
> > >
> > > Ian
> > >
> > > Index: configure.in
> > > ===================================================================
> > > RCS file: /projects/cvsroot/pgsql/configure.in,v
> > > retrieving revision 1.136
> > > diff -u -r1.136 configure.in
> > > --- configure.in 2001/09/06 03:23:38 1.136
> > > +++ configure.in 2001/09/07 04:58:47
> > > @@ -1216,25 +1216,18 @@
> > > AC_CHECK_PROGS(SGMLSPL, sgmlspl)
> > > fi
> > >
> > > -# check whether 'test -ef' works
> > > -if (test "$srcdir" -ef "$srcdir") >/dev/null 2>&1 ; then
> > > - test_ef_works=yes
> > > -else
> > > - test_ef_works=no
> > > -fi
> > > -
> > > abs_top_srcdir=
> > > AC_SUBST(abs_top_srcdir)
> > >
> > > -if test "$test_ef_works" = yes ; then
> > > # prepare build tree if outside source tree
> > > - if test "$srcdir" -ef . ; then : ; else
> > > - abs_top_srcdir=`cd $srcdir && pwd`
> > > - echo $ac_n "preparing build tree... $ac_c" 1>&6
> > > - /bin/sh "$srcdir/config/prep_buildtree" "$abs_top_srcdir" "." \
> > > - || AC_MSG_ERROR(failed)
> > > - AC_MSG_RESULT(done)
> > > - fi
> > > +if test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
> > > + :
> > > +else
> > > + abs_top_srcdir=`cd $srcdir && pwd`
> > > + echo $ac_n "preparing build tree... $ac_c" 1>&6
> > > + /bin/sh "$srcdir/config/prep_buildtree" "$abs_top_srcdir" "." \
> > > + || AC_MSG_ERROR(failed)
> > > + AC_MSG_RESULT(done)
> > > fi
> > >
> > > AC_OUTPUT(
> > > Index: prep_buildtree
> > > ===================================================================
> > > RCS file: /projects/cvsroot/pgsql/config/prep_buildtree,v
> > > retrieving revision 1.3
> > > diff -u -r1.3 prep_buildtree
> > > --- prep_buildtree 2001/03/03 15:53:41 1.3
> > > +++ prep_buildtree 2001/09/07 04:59:01
> > > @@ -29,10 +29,12 @@
> > > fi
> > > done
> > >
> > > -for item in `find "$sourcetree" -name Makefile -o -name GNUmakefile`; do
> > > +for item in `find "$sourcetree" -name Makefile -print -o -name GNUmakefile -print`; do
> > > subdir=`expr "$item" : "$sourcetree\(.*\)"`
> > > if test ! -f "${item}.in"; then
> > > - ln -fs "$item" "$buildtree/$subdir" || exit 1
> > > + if cmp "$item" "$buildtree/subdir" >/dev/null 2>&1; then : ; else
> > > + ln -fs "$item" "$buildtree/$subdir" || exit 1
> > > + fi
> > > fi
> > > done
> > >
> > >
> >
> >
>
> --
> Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2001-09-07 18:25:24 Re: [GENERAL] Re: Re: copy to/from stdout using libpgtcl
Previous Message Ian Lance Taylor 2001-09-07 16:58:03 Re: Support building in a different directory on Solaris