libtool-patches
[Top][All Lists]
Advanced

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

remove temporary files


From: Bruno Haible
Subject: remove temporary files
Date: Sat, 29 Mar 2003 13:15:04 +0100 (CET)

This patch makes it possible to use libtool for installing libintl and
libiconv on systems where the "ln" program in the PATH is GNU ln and uses
libintl and libiconv (for i18n purposes).

There are three scenarios:

- "ln" is /bin/ln except on Solaris. Then either of
      rm -f && ln -s
      ln -s -f
  are acceptable.

- "ln" is GNU ln, linked with libintl and/or libiconv. Then
      rm -f && ln -s
  does not work because when "ln" is run, the library it depends on has
  just be removed. Whereas
      ln -s -f
  works because once "ln" is running it is harmless if it unlink()s its
  library.

- "ln" is /bin/ln on Solaris. "ln -s -f" fails because this is a stupid ln
  program. In this case
      rm -f && ln -s
  must be used, and it works because /bin/ln does not depend on GNU libraries.


2003-02-18  Bruno Haible  <address@hidden>

        * ltmain.sh (install): Use "ln -s -f" instead of "rm -f && ln -s"
        to make a symlink for a shared library. Take care of Solaris /bin/ln.
        Reported by Nelson H. F. Beebe <address@hidden>.

*** libtool-1.4.3/ltmain.sh     2002-10-23 04:26:24.000000000 +0200
--- ltmain.sh   2003-02-18 21:53:41.000000000 +0100
***************
*** 4261,4268 ****
            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)"
              fi
            done
          fi
--- 4281,4288 ----
            for linkname
            do
              if test "$linkname" != "$realname"; then
!               $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




reply via email to

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