Recommend to put gnulib-cache.m4 into EXTRA_DIST.
authorBruno Haible <bruno@clisp.org>
Sun, 29 Jun 2008 23:18:28 +0000 (01:18 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 29 Jun 2008 23:18:28 +0000 (01:18 +0200)
ChangeLog
gnulib-tool

index 87da51d..3667cde 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-06-29  Bruno Haible  <bruno@clisp.org>
+
+       * gnulib-tool (func_import): Recommend to put gnulib-cache.m4 into
+       EXTRA_DIST.
+       Reported by Sylvain Beucler <beuc@beuc.net>.
+
 2008-06-26  Jim Meyering  <meyering@redhat.com>
 
        make several modules depend on the "open" module
index 7b660b9..989869d 100755 (executable)
@@ -3409,6 +3409,18 @@ func_import ()
     fi
   fi
   echo "  - mention \"-I ${m4base}\" in ACLOCAL_AMFLAGS in Makefile.am,"
+  {
+    # Find the first parent directory of $m4base that contains a Makefile.am.
+    sed_last='s,^.*/\([^/][^/]*\)//*$,\1/,
+s,//*$,/,'
+    sed_butlast='s,[^/][^/]*//*$,,'
+    dir1="${m4base}/"; dir2=""
+    while test -n "$dir1" && test ! -f "${destdir}/${dir1}Makefile.am"; do
+      dir2=`echo "$dir1" | sed -e "$sed_last"`"$dir2"
+      dir1=`echo "$dir1" | sed -e "$sed_butlast"`
+    done
+    echo "  - mention ${dir2}gnulib-cache.m4 in EXTRA_DIST in ${dir1}Makefile.am."
+  }
   echo "  - invoke ${macro_prefix}_EARLY in $configure_ac, right after AC_PROG_CC,"
   echo "  - invoke ${macro_prefix}_INIT in $configure_ac."
 }