]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
*** empty log message ***
authorGordon Matzigkeit <gord@gnu.ai.mit.edu>
Fri, 13 Jun 1997 21:40:39 +0000 (21:40 +0000)
committerGordon Matzigkeit <gord@gnu.org>
Fri, 13 Jun 1997 21:40:39 +0000 (21:40 +0000)
ChangeLog
NEWS
ltconfig.in
ltmain.sh.in

index 50e37880d79633d022678f5dac0c7571d5050d11..7e6bd965950958a9174c13992f183920515527b2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jun 13 14:18:23 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
+
+       * ltmain.sh.in (install, uninstall): Support installing and
+       uninstalling `.lo' files.  From Jeff Dairiki.
+
 Wed Jun 11 11:04:59 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
 
        * Makefile.am (ltconfig, ltmain.sh): Only move if $(srcdir) is not
diff --git a/NEWS b/NEWS
index 875c43a9341509a1bcac1925398a2c0ae9cc4529..6a4bfd4f2e8416248d318c563e00953982a65051 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,8 @@ New in 0.9h:
 * Basic support for dynamically loaded modules: new `-export-dynamic'
   linking flag and corresponding `dlname' mode.
 * New `--features' flag to display configured libtool attributes.
+* Added support for installing libtool objects, both in absolute and
+  relative directories.
 * Support *-*-linux-gnu* as an alias for *-*-linux*.
 * Support for *-*-openbsd* and *-*-freebsd3*.
 \f
index 05ceb66fc34e9bdf66a1a8a2a26ef0f33df2ae2e..8d218b5437945675bf4751b2598ed67232b6f80a 100755 (executable)
@@ -434,6 +434,7 @@ else
   solaris2*)
     pic_flag='-KPIC'
     link_static_flag='-Bstatic'
+    wl='-Wl,'
     ;;
 
   sunos4*)
index bf01ee68c5cb56c9a838d5ded6e8705a556e1acc..a80930d29133ad6ba9bdf41473aac0f59362cd8c 100644 (file)
@@ -1172,15 +1172,33 @@ EOF
     test -d "$dest" && isdir=yes
     if test -n "$isdir"; then
       destdir="$dest"
+      destname=
     else
       destdir=`echo "$dest" | sed 's%/[^/]*$%%'`
+      destname=`echo "$dest" | sed 's%^.*/%%'`
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files
+      if $# -gt 2; then
+        echo "$progname: \`$dest' is not a directory" 1>&2
+        echo "$help" 1>&2
+       exit 1
+      fi
     fi
     case "$destdir" in
     /*) ;;
     *)
-      echo "$progname: $destdir must be an absolute directory name" 1>&2
-      echo "$help" 1>&2
-      exit 1
+      for file in $files; do
+       case "$file" in
+       *.lo) ;;
+       *)
+         echo "$progname: \`$destdir' must be an absolute directory name" 1>&2
+         echo "$help" 1>&2
+         exit 1
+         ;;
+       esac
+      done
+      ;;
     esac
 
     staticlibs=
@@ -1298,6 +1316,50 @@ EOF
        test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
        ;;
 
+      *.lo)
+        # Install (i.e. copy) a libtool object.
+
+        # Figure out destination file name, if it wasn't already specified.
+        if test -n "$destname"; then
+         destfile="$destdir/$destname"
+       else
+         destfile=`echo "$file" | sed 's%^.*/%%;'`
+         destfile="$destdir/$destfile"
+        fi
+
+       # Deduce the name of the destination old-style object file.
+       case "$destfile" in
+       *.lo)
+         staticdest=`echo "$destfile" | sed 's/\.lo$/\.o/;'`
+         ;;
+       *.o)
+         staticdest="$destfile"
+         destfile=
+         ;;
+       *)
+         echo "$progname: cannot copy a libtool object to \`$destfile'" 1>&2
+         echo "$help" 1>&2
+         exit 1
+          ;;
+       esac
+
+       # Install the libtool object if requested.
+       if test -n "$destfile"; then
+         $show "$install_prog $file $destfile"
+         $run $install_prog $file $destfile || exit $?
+       fi
+
+       # Install the old object if enabled.
+       if test "$build_old_libs" = yes; then
+         # Deduce the name of the old-style object file.
+         staticobj=`echo "$file" | sed 's/\.lo$/\.o/;'`
+
+         $show "$install_prog $staticobj $staticdest"
+         $run $install_prog $staticobj $staticdest || exit $?
+       fi
+       exit 0
+       ;;
+
       *)
        # Do a test to see if this is really a libtool program.
        if egrep "^# Generated by $PROGRAM" $file >/dev/null 2>&1; then
@@ -1542,6 +1604,13 @@ EOF
          # FIXME: should reinstall the best remaining shared library.
        fi
        ;;
+
+      *.lo)
+       if test "$build_old_libs" = yes; then
+         oldobj=`echo "$name" | sed 's/\.lo$/\.o/'`
+         rmfiles="$rmfiles $dir/$oldobj"
+       fi
+       ;;
       esac
 
       $show "$rm $rmfiles"