Quoting Ralf Wildenhues <[EMAIL PROTECTED]>:

Hello Benoit,

* Benoit Sigoure wrote on Sun, Jun 17, 2007 at 01:16:35AM CEST:

I've reviewed the patches I proposed back in March, completed them with
tests, ChangeLog and NEWS entries.  If they are accepted, I'll write the
documentation.

Please write the documentation.  ;-)

PPS: Although this would belong to
{autoconf,automake,[EMAIL PROTECTED], I only sent it to the
Autoconf ML because Autoconf has the biggest patch and I expect Automake
and Libtool maintainers to see this message.  I hope my assumption
wasn't wrong :)

Well.  One purpose of the different lists is that, a couple of years
down the road, one can still dig out useful information from the
archives.  And I personally tend to look for patches to some package
only in my $PACKACKE-patches list archive.  So please send each patch to
its list.  Thank you.


2007-06-17  Benoit Sigoure  <[EMAIL PROTECTED]>

        * libtoolize.m4sh: New option `--clean'.
        (func_serial_update, func_keyword_update): Remove the files
        installed by `--install' when `--clean' is passed.
        * NEWS: Mention the new option.
        * tests/libtoolize.at: Test the new feature.
        * doc/libtool.texi: Mention the new option of libtoolize.

--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Index: NEWS
===================================================================
RCS file: /sources/libtool/libtool/NEWS,v
retrieving revision 1.204
diff -u -r1.204 NEWS
--- NEWS        8 May 2007 14:38:50 -0000       1.204
+++ NEWS        18 Jun 2007 22:07:09 -0000
@@ -46,6 +46,8 @@
     libtoolize.  The new recursive and non-recursive build modes for
     libltdl don't require a subconfigure any more.
     The Libtool package itself builds libltdl nonrecursively.
+  - New libtoolize option: --clean.  Provides a way to undo the work of
+    libtoolize in order to "un-bootstrap" a project.
   - New multi-module-loader safe libltdl handle iteration APIs:
     lt_dlhandle_iterate, lt_dlhandle_fetch, lt_dlhandle_map.
   - New lt_dlinterface_register to maintain separation of concerns
Index: libtoolize.m4sh
===================================================================
RCS file: /sources/libtool/libtool/libtoolize.m4sh,v
retrieving revision 1.62
diff -u -r1.62 libtoolize.m4sh
--- libtoolize.m4sh     25 Mar 2007 12:12:42 -0000      1.62
+++ libtoolize.m4sh     18 Jun 2007 22:07:09 -0000
@@ -5,7 +5,7 @@
 # libtoolize (GNU @PACKAGE@@TIMESTAMP@) @VERSION@
 # Written by Gary V. Vaughan <[EMAIL PROTECTED]>, 2003
 
-# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 # This is free software; see the source for copying conditions.  There is NO
 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
@@ -34,6 +34,7 @@
 # -n, --dry-run         print commands rather than running them
 # -f, --force           replace existing files
 # -i, --install         copy missing auxiliary files
+#     --clean           remove auxiliary files
 #     --ltdl[=DIR]      install libltdl sources [default: libltdl]
 #     --nonrecursive    prepare ltdl for non-recursive make
 # -q, --quiet           work silently
@@ -84,6 +85,7 @@
 opt_debug=:
 opt_force=false
 opt_install=false
+opt_clean=false
 opt_link=:
 opt_ltdl=false
 
@@ -142,6 +144,10 @@
 
       --install|-i)    opt_install=: ;;
 
+      --clean)         opt_clean=:
+                       opt_quiet=:
+                       ;;
+
       --ltdl)          opt_ltdl=:
                        if test "$#" -gt 0; then
                          case $1 in
@@ -724,6 +730,17 @@
     my_srcfile="$my_srcdir/$my_filename"
     my_destfile="$my_destdir/$my_filename"
 
+    if $opt_clean; then
+      if $opt_dry_run; then
+        echo rm -f "$my_destfile"
+        my_return_status=0
+      else
+        rm -f "$my_destfile"
+        my_return_status=$?
+      fi
+      return $my_return_status
+    fi
+
     test -f "$my_srcfile" || func_fatal_error "\`$my_srcfile' does not exist."
 
     if test -f "$my_destfile"; then
@@ -745,7 +762,6 @@
 
     if $my_serial_update_p || $opt_force; then
       func_copy "$my_srcfile" "$my_destfile"
-      my_return_status=$?
     elif test "X$my_dest_serial" = "X$my_src_serial"; then
       $opt_quiet \
         || func_echo "\`$my_destfile' is already up to date."
@@ -793,6 +809,17 @@
     my_srcfile="$my_srcdir/$my_filename"
     my_destfile="$my_destdir/$my_filename"
 
+    if $opt_clean; then
+      if $opt_dry_run; then
+        echo rm -f "$my_destfile"
+        my_return_status=0
+      else
+        rm -f "$my_destfile"
+        my_return_status=$?
+      fi
+      return $my_return_status
+    fi
+
     my_keyword_update_p=:
 
     test -f "$my_srcfile" || func_fatal_error "\`$my_srcfile' does not exist."
Index: doc/libtool.texi
===================================================================
RCS file: /sources/libtool/libtool/doc/libtool.texi,v
retrieving revision 1.228
diff -u -r1.228 libtool.texi
--- doc/libtool.texi    8 May 2007 14:38:50 -0000       1.228
+++ doc/libtool.texi    18 Jun 2007 22:07:12 -0000
@@ -2298,6 +2298,9 @@
 
 @table @option
 
[EMAIL PROTECTED] --clean
+Remove the files installed by @command{libtoolize}.
+
 @item --copy
 @itemx -c
 Copy files from the libtool data directory rather than creating
Index: tests/libtoolize.at
===================================================================
RCS file: /sources/libtool/libtool/tests/libtoolize.at,v
retrieving revision 1.12
diff -u -r1.12 libtoolize.at
--- tests/libtoolize.at 25 Mar 2007 12:12:43 -0000      1.12
+++ tests/libtoolize.at 18 Jun 2007 22:07:14 -0000
@@ -96,6 +96,34 @@
 AT_CLEANUP
 
 
+## ---------------------- ##
+## Macro un-installation. ##
+## ---------------------- ##
+
+AT_SETUP([Unbootstrap with --clean])
+
+_LT_CONFIGURE_AC
+
+# Save the result of `find' to see whether we properly cleaned everything.
+AT_DATA([list.after], [])
+AT_DATA([list.before], [])
+
+# Create the directories so that they are in list.before
+mkdir m4
+mkdir config
+
+# Save the list of files in the current directory.
+find . | sort >list.before
+
+LT_AT_CHECK_LIBTOOLIZE([--copy], 0, [ignore])
+
+LT_AT_CHECK_LIBTOOLIZE([--clean], 0, [ignore])
+find . | sort >list.after
+AT_CHECK([$at_diff list.before list.after])
+
+AT_CLEANUP
+
+
 ## -------------- ##
 ## Serial update. ##
 ## -------------- ##

Reply via email to