]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* config/ltmain.sh (func_mode_install): Try "ln -s -f" branch-2-0
authorBruno Haible <bruno@clisp.org>
Wed, 24 Aug 2005 15:58:21 +0000 (15:58 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 24 Aug 2005 15:58:21 +0000 (15:58 +0000)
and "rm -f && ln -s" to make a symlink for a shared library: the
former is needed for libraries `ln' depends on, the latter for
Solaris /bin/ln.
Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.

ChangeLog
config/ltmain.m4sh

index 6565b20f7ae4358e56d81dec84c8e6b3040cb430..f15185bd902f4a37ff89bc6ba425cadf1559d526 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2005-08-24  Bruno Haible  <bruno@clisp.org>
 
+       * config/ltmain.sh (func_mode_install): Try "ln -s -f"
+       and "rm -f && ln -s" to make a symlink for a shared library: the
+       former is needed for libraries `ln' depends on, the latter for
+       Solaris /bin/ln.
+       Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
+
        * config/ltmain.sh (cwrappersource): return 127 if exec failed.
 
 2005-08-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
index 71e8f549a4682dd5e26c36818d7a3b62ac7451a3..8277220979feb94848a5305776cad089a133e8de 100644 (file)
@@ -1867,11 +1867,14 @@ func_mode_install ()
 
          if test "$#" -gt 0; then
            # Delete the old symlinks, and create new ones.
+           # Try `ln -sf' first, because the `ln' binary might depend on
+           # the symlink we replace!  Solaris /bin/ln does not understand -f,
+           # so we also need to try rm && ln -s.
            for linkname
            do
              if test "$linkname" != "$realname"; then
-               $show "(cd $destdir && $RM $linkname && $LN_S $realname $linkname)"
-               $run eval "(cd $destdir && $RM $linkname && $LN_S $realname $linkname)"
+               $show "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+               $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
              fi
            done
          fi