* tests/Makefile.am (TESTS): Added include2.test.
* tests/include2.test: New file.
* tests/include.test: Check to make sure include file is
distributed.
* automake.in (read_am_file): Distribute included files.
+2002-08-19 Tom Tromey <tromey@redhat.com>
+
+ For PR automake/348:
+ * tests/Makefile.am (TESTS): Added include2.test.
+ * tests/include2.test: New file.
+ * tests/include.test: Check to make sure include file is
+ distributed.
+ * automake.in (read_am_file): Distribute included files.
+
2002-08-19 Alexandre Duret-Lutz <duret_g@epita.fr>
Fix for PR automake/345:
my $path = $1;
if ($path =~ s/^\$\(top_srcdir\)\///)
- {
+ {
push (@include_stack, "\$\(top_srcdir\)/$path");
- }
+ # Distribute any included file.
+ my $distname = backname ($relative_dir) . '/' . $path;
+ push_dist_common ($distname);
+ }
else
- {
+ {
$path =~ s/\$\(srcdir\)\///;
push (@include_stack, "\$\(srcdir\)/$path");
- $path = $relative_dir . "/" . $path;
- }
+ push_dist_common (($relative_dir eq '.')
+ ? $path : ($relative_dir . '/' . $path));
+ $path = $relative_dir . "/" . $path;
+ }
&read_am_file ($path);
}
else
header.test \
implicit.test \
include.test \
+include2.test \
info.test \
insh.test \
insh2.test \
header.test \
implicit.test \
include.test \
+include2.test \
info.test \
insh.test \
insh2.test \
$AUTOMAKE || exit 1
len="`grep '^srcdir' Makefile.in | wc -l`"
echo "len = $len"
-test $len -eq 1
+test $len -eq 1 || exit 1
+
+# Also make sure include file is distributed.
+(sed -n -e '/^DIST_COMMON =.*\\$/ {
+ :loop
+ p
+ n
+ /\\$/ b loop
+ p
+ n
+ }' -e '/^DIST_COMMON =/ p' Makefile.in | grep foo)
--- /dev/null
+#! /bin/sh
+
+# Make sure header in parent directory is included.
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile])
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub
+END
+
+: > foo
+
+mkdir sub
+cat > sub/Makefile.am << 'END'
+include $(top_srcdir)/foo
+END
+
+$ACLOCAL || exit 1
+$AUTOMAKE || exit 1
+
+# Also make sure include file is distributed.
+(sed -n -e '/^DIST_COMMON =.*\\$/ {
+ :loop
+ p
+ n
+ /\\$/ b loop
+ p
+ n
+ }' -e '/^DIST_COMMON =/ p' sub/Makefile.in | fgrep ../foo)