From: Alexandre Duret-Lutz Date: Wed, 5 Dec 2001 17:13:41 +0000 (+0000) Subject: * automake.in (handle_dist): Distribute common files which X-Git-Tag: Release-1-5b~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23266a96d251c35b6f3b14bc46c2494656252672;p=thirdparty%2Fautomake.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 4d85c7201..163e0cc01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-12-05 Alexandre Duret-Lutz + + * 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 * automake.in (macro_define): Fix misuse of chomp introduced on diff --git a/automake.in b/automake.in index 2f6092edf..7f075c859 100755 --- a/automake.in +++ b/automake.in @@ -3375,7 +3375,9 @@ sub handle_dist } 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); } diff --git a/automake.texi b/automake.texi index 7f1d8f516..1682e9e82 100644 --- a/automake.texi +++ b/automake.texi @@ -3600,8 +3600,9 @@ is run. The default setting is @samp{--best}. 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. diff --git a/tests/Makefile.am b/tests/Makefile.am index a03a86685..22b21dd8d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -118,6 +118,7 @@ dirname.test \ discover.test \ distcommon.test \ distcommon2.test \ +distcommon3.test \ distdir.test \ distname.test \ double.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 4f97e86ae..b453462b4 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -191,6 +191,7 @@ dirname.test \ discover.test \ distcommon.test \ distcommon2.test \ +distcommon3.test \ distdir.test \ distname.test \ double.test \ diff --git a/tests/distcommon3.test b/tests/distcommon3.test new file mode 100755 index 000000000..f093b1071 --- /dev/null +++ b/tests/distcommon3.test @@ -0,0 +1,23 @@ +#! /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