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>.
2005-08-24 Bruno Haible <bruno@clisp.org>
+ * 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 <beebe@math.utah.edu>.
+
* ltmain.in (cwrappersource): return 127 if exec failed.
2005-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
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