gnulib-tool: Fix expression that counts directories.
authorBruno Haible <bruno@clisp.org>
Sat, 4 Sep 2010 15:47:30 +0000 (17:47 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 4 Sep 2010 15:48:15 +0000 (17:48 +0200)
ChangeLog
gnulib-tool

index 6616cbb..47e82e4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,7 +11,7 @@
        gnulib-tool: Avoid error when run in a package without Makefile.am.
        * gnulib-tool: When collecting the m4dirs in a package that does not
        have a Makefile.am, eliminate those directories that contain no
-       gnulib-cache.m4.
+       gnulib-cache.m4. Fix expression that counts these directories.
 
 2010-09-04  Bruno Haible  <bruno@clisp.org>
 
index d419df1..0352078 100755 (executable)
@@ -5519,7 +5519,7 @@ s/\([.*$]\)/[\1]/g'
           sedexpr3='s,/[^/]*$,,'
           m4dirs=`sed -n -e "$sedexpr1" aclocal.m4 | sed -e "$sedexpr2" -e "$sedexpr3" | LC_ALL=C sort -u`
           m4dirs=`for arg in $m4dirs; do if test -f "$destdir/$arg"/gnulib-cache.m4; then echo $arg; fi; done`
-          m4dirs_count=`printf %s "$m4dirs" | wc -l`
+          m4dirs_count=`for arg in $m4dirs; do echo "$arg"; done | wc -l`
         fi
       fi
       if test $m4dirs_count = 0; then