# HG changeset patch # User Bruno Haible # Date 1283615250 -7200 # Node ID 38f90e1a26c28c085e6175b0e9dc19afd5430b77 # Parent 016a2b7d7d27c9b43113528e685b9bc5eaeae9c4 gnulib-tool: Fix expression that counts directories. diff --git a/ChangeLog b/ChangeLog --- 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 diff --git a/gnulib-tool b/gnulib-tool --- a/gnulib-tool +++ b/gnulib-tool @@ -5519,7 +5519,7 @@ 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