From: Bruno Haible Date: Sat, 4 Sep 2010 15:38:58 +0000 (+0200) Subject: gnulib-tool: Avoid error when run in a package without Makefile.am. X-Git-Tag: v0.1~3855 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=a3620d8faf7d8f06cba8fd529d4f93a56416d1e1;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index e82e39f6a..0ef095c52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2010-09-04 Bruno Haible + 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. + +2010-09-04 Bruno Haible + update-copyright test: Improve output when perl is missing or too old. * tests/test-update-copyright.sh: Move test of Perl version down after the test whether Perl exists. Provide an explanation relating Perl's diff --git a/gnulib-tool b/gnulib-tool index 816840840..d419df12d 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -3313,6 +3313,7 @@ func_emit_initmacro_done () # - modcache true or false, from --cache-modules/--no-cache-modules # - verbose integer, default 0, inc/decremented by --verbose/--quiet # - libname library name +# - supplied_libname true if --lib was given, blank otherwise # - sourcebase directory relative to destdir where to place source code # - m4base directory relative to destdir where to place *.m4 macros # - pobase directory relative to destdir where to place *.po files @@ -5517,6 +5518,7 @@ s/\([.*$]\)/[\1]/g' sedexpr2='s,^[^/]*$,.,' 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` fi fi