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>
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