libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

darwin.7.diff


From: Peter O'Gorman
Subject: darwin.7.diff
Date: Sun, 30 Mar 2003 23:52:17 +0900

It looks like I broke DESTDIR support on darwin, this patch fixes that and adds a test to make sure DESTDIR works.

Inline and attached.. you will need patch -p1 for this one.

Peter

diff -urN libtool.cvs/ChangeLog libtool.pogma/ChangeLog
--- libtool.cvs/ChangeLog       Sun Mar 30 23:40:42 2003
+++ libtool.pogma/ChangeLog     Sun Mar 30 23:47:37 2003
@@ -1,3 +1,10 @@
+2003-03-30  Peter O'Gorman  <address@hidden>
+
+       * ltmain.in: Make DESTDIR work on darwin
+       * tests/defs: Add $destdir
+       * tests/Makefile.am: Add destdir.test and supporting tests
+       * tests/destdir.test: Check that make install DESTDIR=blah works.
+
 2003-03-28  Richard Dawe  <address@hidden>

        * Makefile.am: Define CONF_SUBDIRS.
diff -urN libtool.cvs/ltmain.in libtool.pogma/ltmain.in
--- libtool.cvs/ltmain.in       Sun Mar 30 23:40:48 2003
+++ libtool.pogma/ltmain.in     Sun Mar 30 23:43:45 2003
@@ -2405,6 +2405,12 @@
              *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
              esac
              add="-l$name"
+           elif test "$hardcode_automatic" = yes; then
+ if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then
+               add="$inst_prefix_dir$libdir/$linklib"
+             else
+               add="$libdir/$linklib"
+             fi
            else
              # We cannot seem to hardcode it, guess we'll fake it.
              add_dir="-L$libdir"
diff -urN libtool.cvs/tests/Makefile.am libtool.pogma/tests/Makefile.am
--- libtool.cvs/tests/Makefile.am       Tue Nov 19 03:59:44 2002
+++ libtool.pogma/tests/Makefile.am     Sun Mar 30 23:43:45 2003
@@ -43,7 +43,8 @@
        mdemo-inst.test mdemo-unst.test \
        assign.test link.test link-2.test nomode.test \
        quote.test sh.test suffix.test pdemo-conf.test \
-       pdemo-make.test pdemo-exec.test pdemo-inst.test
+       pdemo-make.test pdemo-exec.test pdemo-inst.test \
+       depdemo-shared.test depdemo-make.test destdir.test depdemo-unst.test

 if HAVE_CXX
 if HAVE_F77
diff -urN libtool.cvs/tests/defs libtool.pogma/tests/defs
--- libtool.cvs/tests/defs      Sat Mar 29 14:06:46 2003
+++ libtool.pogma/tests/defs    Sun Mar 30 23:43:45 2003
@@ -34,6 +34,10 @@
   test -d $prefix && rm -rf $prefix
   prefix=NONE
 fi
+#destroot test
+destdir="./_inst/tmp"
+test -d $destdir || mkdir -p $destdir
+destdir=`cd $destdir && pwd`

 # Extract CC from the libtool configuration
 eval `$libtool --config | grep '^CC='`
diff -urN libtool.cvs/tests/destdir.test libtool.pogma/tests/destdir.test
--- libtool.cvs/tests/destdir.test      Thu Jan  1 09:00:00 1970
+++ libtool.pogma/tests/destdir.test    Sun Mar 30 23:44:00 2003
@@ -0,0 +1,55 @@
+#! /bin/sh
+# depdemo-inst.test - try installing from the ../depdemo subdirectory
+
+# Test script header.
+need_prefix=yes
+if test -z "$srcdir"; then
+  srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
+  test "$srcdir" = "$0" && srcdir=.
+  test "${VERBOSE+set}" != "set" && VERBOSE=yes
+fi
+. $srcdir/defs || exit 1
+
+# Check that things are built.
+if test -f ../depdemo/depdemo$EXEEXT; then :
+else
+  echo "You must run depdemo-make.test before $0" 1>&2
+  exit 77
+fi
+
+# Change to our build directory.
+cd ../depdemo || exit 1
+
+echo "= Running $make install DESTDIR=$destdir in ../depdemo"
+$make install DESTDIR=$destdir || exit 1
+
+echo "= tarring up the installed files"
+cd $destdir
+tar -C $destdir/$prefix/. -cvf destdir.tar .
+echo "= untarring the installed files"
+cd $prefix
+tar -xvf $destdir/destdir.tar
+rm -rf $destdir
+
+echo "= Executing installed programs"
+
+status=0
+if $prefix/bin/depdemo_static; then :
+else
+  echo "$0: cannot execute $prefix/bin/depdemo_static" 1>&2
+  status=1
+fi
+
+if $prefix/bin/depdemo; then :
+else
+  echo "$0: cannot execute $prefix/bin/depdemo" 1>&2
+
+  # Simple check to see if they are superuser.
+  if test -w /; then :
+  else
+    echo "You may need to run $0 as the superuser."
+  fi
+  status=1
+fi
+
+exit $status

Attachment: darwin.7.diff.gz
Description: GNU Zip compressed data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]