gnulib-tool: Avoid error when run in a package without Makefile.am.
authorBruno Haible <bruno@clisp.org>
Sat, 4 Sep 2010 15:38:58 +0000 (17:38 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 4 Sep 2010 15:38:58 +0000 (17:38 +0200)
* 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.

ChangeLog
gnulib-tool

index e82e39f6ae82426c42fc78c94783a4277025e2d8..0ef095c5258cc2aa489d5e3b7a108eee1363d09a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-09-04  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        update-copyright test: Improve output when perl is missing or too old.
index 8168408400badcfd73cec87f42c4fa995f260dfb..d419df12dfe460ca972510dbf86aea748df63eb6 100755 (executable)
@@ -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