Support building in a different directory on Solaris

Поиск
Список
Период
Сортировка
От Ian Lance Taylor
Тема Support building in a different directory on Solaris
Дата
Msg-id 20010810204147.6276.qmail@daffy.airs.com
обсуждение исходный текст
Ответы Re: Support building in a different directory on Solaris
Re: Support building in a different directory on Solaris
Список pgsql-patches
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

В списке pgsql-patches по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: JDBC Array Support, Take 2
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Support building in a different directory on Solaris