[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: depout.m4 adjustment for post-processed Makefile.ins
From: |
Alexandre Duret-Lutz |
Subject: |
FYI: depout.m4 adjustment for post-processed Makefile.ins |
Date: |
Tue, 23 Apr 2002 18:57:57 +0200 |
User-agent: |
Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu) |
That's the second time the issue comes on the mailing list.
Index: ChangeLog
===================================================================
RCS file: /cvs/automake/automake/ChangeLog,v
retrieving revision 1.1812.2.9
diff -u -r1.1812.2.9 ChangeLog
--- ChangeLog 22 Apr 2002 18:28:21 -0000 1.1812.2.9
+++ ChangeLog 23 Apr 2002 16:55:39 -0000
@@ -1,3 +1,11 @@
+2002-04-23 Alexandre Duret-Lutz <address@hidden>
+
+ * 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 <address@hidden>
For PR automake/151 and PR automake/314:
Index: m4/depout.m4
===================================================================
RCS file: /cvs/automake/automake/m4/depout.m4,v
retrieving revision 1.13
diff -u -r1.13 depout.m4
--- m4/depout.m4 6 Mar 2002 04:45:30 -0000 1.13
+++ m4/depout.m4 23 Apr 2002 16:55:39 -0000
@@ -25,7 +25,13 @@
[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: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.385.2.3
diff -u -r1.385.2.3 Makefile.am
--- tests/Makefile.am 19 Apr 2002 10:23:08 -0000 1.385.2.3
+++ tests/Makefile.am 23 Apr 2002 16:55:39 -0000
@@ -253,6 +253,7 @@
pluseq6.test \
pluseq7.test \
pluseq8.test \
+postproc.test \
ppf77.test \
pr2.test \
pr9.test \
Index: tests/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.in,v
retrieving revision 1.499.2.6
diff -u -r1.499.2.6 Makefile.in
--- tests/Makefile.in 19 Apr 2002 10:23:08 -0000 1.499.2.6
+++ tests/Makefile.in 23 Apr 2002 16:55:39 -0000
@@ -329,6 +329,7 @@
pluseq6.test \
pluseq7.test \
pluseq8.test \
+postproc.test \
ppf77.test \
pr2.test \
pr9.test \
Index: tests/postproc.test
===================================================================
RCS file: tests/postproc.test
diff -N tests/postproc.test
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ tests/postproc.test 23 Apr 2002 16:55:39 -0000
@@ -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
+
+:
--
Alexandre Duret-Lutz
- FYI: depout.m4 adjustment for post-processed Makefile.ins,
Alexandre Duret-Lutz <=