I wanted to use
AC_CONFIG_FILES(foo/bar.h:foo/bar.in)
but found automake generates rules based on bar.h.in, not bar.in.
I think the following might be modifying @other_input_files, changing
"foo/bar.h:foo/bar.in" to just "foo/bar.h" by the time it gets to
process the foo subdirectory.
foreach my $file (@other_input_files)
{
if ($file =~ /^([^:]*):(.*)$/)
{
# This is the ":" syntax of AC_OUTPUT.
$file = $1;
But perl arrays and references are a mystery to me, so someone can
check that.
In any case with it fixed the right rules are generated for bar.h, but
DIST_COMMON seems to get foo/bar.in, whereas I think it should be just
bar.in. Perhaps the following a few lines later needs some sort of
basename.
push_dist_common (@inputs);
colon7.test gets these problems, the couple of greps below will let it
detect them.
* tests/colon7.test: Grep for a couple of AC_OUTPUT problems.
--- colon7.test.old Sat Jan 20 18:25:08 2001
+++ colon7.test Sat Jan 20 19:02:27 2001
@@ -24,4 +24,12 @@
: subdir/Makefile.am
: subdir/foo
-$AUTOMAKE
+$AUTOMAKE || exit 1
+
+# shouldn't have any bar.in
+grep 'bar.in' subdir/Makefile.in exit 1
+
+# DIST_COMMON should have foo, not subdir/foo
+grep 'DIST_COMMON.*subdir/foo' subdir/Makefile.in exit 1
+
+exit 0