do not exist but are target of a Makefile rule.
* automake.texi (Dist): Update.
* test/builtcommon3.test: New file.
* test/Makefile.am (TESTS): Add distcommon3.test.
+2001-12-05 Alexandre Duret-Lutz <duret_g@epita.fr>
+
+ * automake.in (handle_dist): Distribute common files which
+ do not exist but are target of a Makefile rule.
+ * automake.texi (Dist): Update.
+ * test/builtcommon3.test: New file.
+ * test/Makefile.am (TESTS): Add distcommon3.test.
+
2001-12-04 Alexandre Duret-Lutz <duret_g@epita.fr>
* automake.in (macro_define): Fix misuse of chomp introduced on
}
foreach my $cfile (@common_files)
{
- if (-f ($relative_dir . "/" . $cfile))
+ if (-f ($relative_dir . "/" . $cfile)
+ # The file might be absent, but if it can be built it's ok.
+ || exists $targets{$cfile})
{
&push_dist_common ($cfile);
}
For the most part, the files to distribute are automatically found by
Automake: all source files are automatically included in a distribution,
as are all @file{Makefile.am}s and @file{Makefile.in}s. Automake also
-has a built-in list of commonly used files which, if present in the
-current directory, are automatically included. This list is printed by
+has a built-in list of commonly used files which are automatically
+included if they are found in the current directory (either physically,
+or as the target of a @file{Makefile.am} rule). This list is printed by
@samp{automake --help}. Also, files which are read by @code{configure}
(i.e. the source files corresponding to the files specified in the
@code{AC_OUTPUT} invocation) are automatically distributed.
discover.test \
distcommon.test \
distcommon2.test \
+distcommon3.test \
distdir.test \
distname.test \
double.test \
discover.test \
distcommon.test \
distcommon2.test \
+distcommon3.test \
distdir.test \
distname.test \
double.test \
--- /dev/null
+#! /bin/sh
+
+# Test to make sure that non-existing common files are distributed
+# if they are buildable.
+
+. $srcdir/defs || exit 1
+
+cat > Makefile.am << 'END'
+README:
+ echo 'I bet you are reading me.' > README
+END
+
+$ACLOCAL || exit 1
+$AUTOMAKE || exit 1
+
+sed -n -e '/^DIST_COMMON =.*\\$/ {
+ :loop
+ p
+ n
+ /\\$/ b loop
+ p
+ n
+ }' -e '/^DIST_COMMON =/ p' Makefile.in | grep README || exit 1