Re: Support building in a different directory on Solaris

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Ian Lance Taylor <ian(at)airs(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Support building in a different directory on Solaris
Date: 2001-09-07 04:35:15
Message-ID: 200109070435.f874ZFm26446@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


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.

> I routinely build tools in a directory other than the source
> directory. This works in 7.1 on Linux and probably many other
> systems, but it doesn't work on Solaris. There are two problems. The
> first is the test built in to /bin/sh does not support -ef, although
> /usr/bin/test does support it. The second is that /bin/find requires
> an explicit -print when -o is used.
>
> Here are a couple of patches to fix these problems. I've tested these
> patches on Linux as well. They should work on all systems.
>
> I did not include a patch to rebuild configure itself. You must run
> autoconf after applying these patches.
>
> Ian
>
> Index: configure.in
> ===================================================================
> RCS file: /home/projects/pgsql/cvsroot/pgsql/configure.in,v
> retrieving revision 1.132
> diff -u -r1.132 configure.in
> --- configure.in 2001/08/01 23:52:50 1.132
> +++ configure.in 2001/08/10 20:37:16
> @@ -1178,6 +1178,10 @@
> # check whether 'test -ef' works
> if (test "$srcdir" -ef "$srcdir") >/dev/null 2>&1 ; then
> test_ef_works=yes
> + ef_test=test
> +elif (/usr/bin/test "$srcdir" -ef "$srcdir") >/dev/null 2>&1 ; then
> + test_ef_works=yes
> + ef_test=/usr/bin/test
> else
> test_ef_works=no
> fi
> @@ -1187,7 +1191,7 @@
>
> if test "$test_ef_works" = yes ; then
> # prepare build tree if outside source tree
> - if test "$srcdir" -ef . ; then : ; else
> + if $ef_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" "." \
> Index: config/prep_buildtree
> ===================================================================
> RCS file: /home/projects/pgsql/cvsroot/pgsql/config/prep_buildtree,v
> retrieving revision 1.3
> diff -u -r1.3 prep_buildtree
> --- config/prep_buildtree 2001/03/03 15:53:41 1.3
> +++ config/prep_buildtree 2001/08/10 20:38:38
> @@ -29,7 +29,7 @@
> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2001-09-07 04:40:11 Re: [GENERAL] Re: copy to/from stdout using libpgtcl
Previous Message Bruce Momjian 2001-09-07 04:30:24 Re: [HACKERS] JDBC pg_description update needed for CVS tip