bootstrap: remove dangling *.[ch] symlinks from lib
authorJim Meyering <meyering@redhat.com>
Wed, 2 Apr 2008 06:32:17 +0000 (08:32 +0200)
committerJim Meyering <meyering@redhat.com>
Wed, 2 Apr 2008 22:15:33 +0000 (00:15 +0200)
* build-aux/bootstrap [dangling symlink removal]: Move find's
-depth option to precede all others, to avoid a warning.
Remove *.[ch] files too, and from "$source_base" (usually lib/).

ChangeLog
build-aux/bootstrap

index 0fae6b5..6f82cdc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-04-03  Jim Meyering  <meyering@redhat.com>
+
+       bootstrap: remove dangling *.[ch] symlinks from lib
+       * build-aux/bootstrap [dangling symlink removal]: Move find's
+       -depth option to precede all others, to avoid a warning.
+       Remove *.[ch] files too, and from "$source_base" (usually lib/).
+
 2008-04-02  Bruno Haible  <bruno@clisp.org>
 
        Avoid some warnings from "gcc -Wshadow".
index 1c90df7..9a85762 100755 (executable)
@@ -548,15 +548,17 @@ if test -f $mam_template; then
   done
 fi
 
-# Remove any dangling symlink matching "*.m4" in the gnulib-populated
-# $m4_base directory, since such a file would cause aclocal to fail.
+# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
+# gnulib-populated directories.  Such .m4 files would cause aclocal to fail.
 # The following requires GNU find 4.2.3 or newer.  Considering the usual
 # portability constraints of this script, that may seem a very demanding
 # requirement, but it should be ok.  Ignore any failure, which is fine,
 # since this is only a convenience to help developers avoid the relatively
 # unusual case in which a symlinked-to .m4 file is git-removed from gnulib
 # between successive runs of this script.
-find "$m4_base" -name '*.m4' -depth -type l -xtype l -delete > /dev/null 2>&1
+find "$m4_base" "$source_base" \
+  -depth \( -name '*.m4' -o -name '*.[ch]' \) \
+  -type l -xtype l -delete > /dev/null 2>&1
 
 # Reconfigure, getting other files.