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

ChangeLog
libltdl/config/ltmain.m4sh

index 08af0b150e9bd1d0b11b6d00ac0f2694b8340317..027c28c8aed07238ed915c854ebee76a86aa50b0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-09-21  Peter Ekberg  <peda@lysator.liu.se>,
+
+       * libltdl/config/ltmain.m4sh (func_mode_uninstall): Clean
+       up $dlname as well when cleaning a 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>,
 
        * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG):
index 6289c92d643ba1a9364c312ef25b27598a79fbf8..7967a6f187bcbea5a4720cc7baba6ad3d8521932 100644 (file)
@@ -6564,9 +6564,17 @@ func_mode_uninstall ()
            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.
              func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
@@ -6577,7 +6585,8 @@ func_mode_uninstall ()
              func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
            fi
            # FIXME: should reinstall the best remaining shared library.
-         fi
+           ;;
+         esac
        fi
        ;;