From: Bruno Haible Date: Wed, 24 Aug 2005 15:59:04 +0000 (+0000) Subject: * ltmain.in (install mode): Try "ln -s -f" and "rm -f && ln -s" X-Git-Tag: release-1-5-20~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=26b162ba7d5e6cf7366226344660acea8056b320;p=thirdparty%2Flibtool.git * ltmain.in (install mode): 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 . --- diff --git a/ChangeLog b/ChangeLog index c3b4a3489..5bd4cc399 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2005-08-24 Bruno Haible + * ltmain.in (install mode): 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 . + * ltmain.in (cwrappersource): return 127 if exec failed. 2005-08-24 Ralf Wildenhues diff --git a/ltmain.in b/ltmain.in index 8d384a7ed..43144fe1a 100644 --- a/ltmain.in +++ b/ltmain.in @@ -5624,11 +5624,14 @@ relink_command=\"$relink_command\"" 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