]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in (clean mode): Clean up $dlname as well when cleaning
authorPeter Ekberg <peda@lysator.liu.se>
Wed, 21 Sep 2005 12:47:54 +0000 (12:47 +0000)
committerPeter Rosin <peda@lysator.liu.se>
Wed, 21 Sep 2005 12:47:54 +0000 (12:47 +0000)
an uninstalled libtool library. Fixes -mode=clean on Cygwin and
MinGW to actually remove the dll when cleaning up an uninstalled
library.

ChangeLog
ltmain.in

index 6eb398e8a65ff3830016c6ed1765fccdad8e261a..dbf89731d3eac57182c98e22157a964073a4170d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-09-21  Peter Ekberg  <peda@lysator.liu.se>,
+
+       * ltmain.in (clean mode): Clean up $dlname as well when cleaning
+       an uninstalled libtool library. Fixes -mode=clean on Cygwin and
+       MinGW to actually remove the dll when cleaning up an uninstalled
+       library.
+
 2005-09-20  Peter Ekberg  <peda@lysator.liu.se>,
 
        * libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS, AC_LIBTOOL_LANG_CXX_CONFIG):
index 3415a783b1d4738ef4dde9baae3a18b8ea7822ac..debc381761c9cc76c27165818df5f96908641db1 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -6185,9 +6185,17 @@ relink_command=\"$relink_command\""
            rmfiles="$rmfiles $objdir/$n"
          done
          test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
-         test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
 
-         if test "$mode" = uninstall; then
+         case "$mode" in
+         clean)
+           case "  $library_names " in
+           # "  " in the beginning catches empty $dlname
+           *" $dlname "*) ;;
+           *) rmfiles="$rmfiles $objdir/$dlname" ;;
+           esac
+           rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+           ;;
+         uninstall)
            if test -n "$library_names"; then
              # Do each command in the postuninstall commands.
              cmds=$postuninstall_cmds
@@ -6220,7 +6228,8 @@ relink_command=\"$relink_command\""
              IFS="$save_ifs"
            fi
            # FIXME: should reinstall the best remaining shared library.
-         fi
+           ;;
+         esac
        fi
        ;;