+2002-04-23 Alexandre Duret-Lutz <duret_g@epita.fr>
+
+ * m4/depout.m4 (_AM_OUTPUT_DEPENDENCY_COMMANDS): Grep
+ the whole file for 'generated by automake', not only the
+ first line. This accounts for post-processed Makefile.in's.
+ * tests/postproc.test: New file.
+ * tests/Makefile.am (TESTS): Add postproc.test.
+
2002-04-22 Alexandre Duret-Lutz <duret_g@epita.fr>
For PR automake/151 and PR automake/314:
[for mf in $CONFIG_FILES; do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
- if (sed 1q $mf | fgrep 'generated by automake') > /dev/null 2>&1; then
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
pluseq6.test \
pluseq7.test \
pluseq8.test \
+postproc.test \
ppf77.test \
pr2.test \
pr9.test \
pluseq6.test \
pluseq7.test \
pluseq8.test \
+postproc.test \
ppf77.test \
pr2.test \
pr9.test \
--- /dev/null
+#! /bin/sh
+
+# Check to make sure we recognize a Makefile.in, even if post-processed
+# and renamed.
+
+. $srcdir/defs || exit 1
+
+cat >configure.in <<'END'
+AC_INIT([mumble], [0.1])
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+AC_CONFIG_FILES([myMakefile])
+AC_OUTPUT
+END
+
+cat > myMakefile.am << 'END'
+bin_PROGRAMS = fred
+fred_SOURCES = fred.c
+END
+
+$ACLOCAL || exit 1
+$AUTOCONF || exit 1
+$AUTOMAKE myMakefile || exit 1
+
+mv myMakefile.in myMakefile.old
+echo '# Post-processed by post-processor 3.14.' > myMakefile.in
+cat myMakefile.old >> myMakefile.in
+
+./configure || exit 1
+
+test -f .deps/fred.Po || test -f _deps/fred.Po || exit 1
+
+: