]> sourceware.org Git - automake.git/commitdiff
* m4/depout.m4 (_AM_OUTPUT_DEPENDENCY_COMMANDS): Grep
authorAlexandre Duret-Lutz <adl@gnu.org>
Tue, 23 Apr 2002 16:59:56 +0000 (16:59 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Tue, 23 Apr 2002 16:59:56 +0000 (16:59 +0000)
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.

ChangeLog
m4/depout.m4
tests/Makefile.am
tests/Makefile.in
tests/postproc.test [new file with mode: 0755]

index 7710feab5a933bed7163a56b585d41d9ea798aee..2ba160f70364aefb4946381abe5325296ecb0fd5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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:
index ef9a4cfd4e44ea30b7d6d4e2c5b4d7143808ddeb..f1900e10bf08c8b111dce1fe0a76c49bdaddfa31 100644 (file)
@@ -25,7 +25,13 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 [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
index 985004c96bee5fab0a0e99c91815733bc49593e2..e9a8ba4d0e5fa2e9193a8ec959c3a60c55ce458f 100644 (file)
@@ -251,6 +251,7 @@ pluseq5.test \
 pluseq6.test \
 pluseq7.test \
 pluseq8.test \
+postproc.test \
 ppf77.test \
 pr2.test \
 pr9.test \
index 93d1f61e8e41caa85818a19bcb9d390682456721..280033f189e3368657b1c8a1ebf84991f7558134 100644 (file)
@@ -335,6 +335,7 @@ pluseq5.test \
 pluseq6.test \
 pluseq7.test \
 pluseq8.test \
+postproc.test \
 ppf77.test \
 pr2.test \
 pr9.test \
diff --git a/tests/postproc.test b/tests/postproc.test
new file mode 100755 (executable)
index 0000000..aa84026
--- /dev/null
@@ -0,0 +1,33 @@
+#! /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
+
+:
This page took 0.035677 seconds and 5 git commands to generate.