summaryrefslogtreecommitdiff
path: root/bin/automake.in
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-12-24 11:23:06 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2014-12-28 11:48:22 +0100
commita4c0c62d52ad7b9785005302ee88311974b28dde (patch)
tree2ba58988782dd9ac1dd266f655675a9f897fc251 /bin/automake.in
parent50ae952fcbe12a086ef6bec7f4f2e46326e7b03d (diff)
downloadautomake-a4c0c62d52ad7b9785005302ee88311974b28dde.tar.gz
texinfo: remove hack about info files in CLEANFILES variables
Automake used to implement an undocumented hack causing '.info' files that appeared to be cleaned (by e.g. being listed in the CLEANFILES variable) to also be built in the builddir rather than in the srcdir; this was for backward compatibility with packages such as Texinfo, which did things like: info_TEXINFOS = texinfo.txi info-stnd.texi info.texi DISTCLEANFILES = texinfo texinfo-* info*.info* # Do not create info files for distribution. dist-info: in order not to distribute .info files. Now that we have the 'info-in-builddir' option that explicitly causes generated '.info' files to be placed in the builddir, this hack is no longer necessary, and we can remove it (after having deprecated it in the Automake 1.14 release already). * bin/automake.in (handle_texinfo_helper): Remove the hack. Adjust comments accordingly. * NEWS: Update. * t/txinfo23.sh: Delete as obsolete. * t/txinfo25.sh: Likewise. * t/txinfo24.sh: Likewise. * t/txinfo28.sh: Delete as mostly obsolete, its only still relevant parts moved ... * t/mdate5.sh: ... into this test. * t/txinfo-clean.sh: Remove references to deleted tests. * t/list-of-tests.mk: Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'bin/automake.in')
-rw-r--r--bin/automake.in66
1 files changed, 13 insertions, 53 deletions
diff --git a/bin/automake.in b/bin/automake.in
index c06fc0fa4..c6bf923a9 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -2948,15 +2948,6 @@ sub handle_texinfo_helper
my $done = 0;
my (@mostly_cleans, @texi_cleans, @maint_cleans) = ('', '', '');
- # Build a regex matching user-cleaned files.
- my $d = var 'DISTCLEANFILES';
- my $c = var 'CLEANFILES';
- my @f = ();
- push @f, $d->value_as_list_recursive (inner_expand => 1) if $d;
- push @f, $c->value_as_list_recursive (inner_expand => 1) if $c;
- @f = map { s|[^A-Za-z_0-9*\[\]\-]|\\$&|g; s|\*|[^/]*|g; $_; } @f;
- my $user_cleaned_files = '^(?:' . join ('|', @f) . ')$';
-
foreach my $texi
($info_texinfos->value_as_list_recursive (inner_expand => 1))
{
@@ -2996,6 +2987,7 @@ sub handle_texinfo_helper
# generic rules.
my $outdir = dirname ($texi) . '/';
$outdir = "" if $outdir eq './';
+ my $src_outdir = '$(srcdir)/'. $outdir;
$out_file = $outdir . $out_file;
# Until Automake 1.6.3, .info files were built in the
@@ -3086,54 +3078,22 @@ sub handle_texinfo_helper
# Consequently, starting with Automake 1.8, .info files are
# built in the source tree again. Because we still plan to
# support non-distributed .info files at some point, we
- # have a single variable ($INSRC) that controls whether
+ # have a single variable ('$insrc') that controls whether
# the current .info file must be built in the source tree
# or in the build tree. Actually this variable is switched
- # off in two cases:
- # (1) For '.info' files that appear to be cleaned; this is for
- # backward compatibility with package such as Texinfo,
- # which do things like
- # info_TEXINFOS = texinfo.txi info-stnd.texi info.texi
- # DISTCLEANFILES = texinfo texinfo-* info*.info*
- # # Do not create info files for distribution.
- # dist-info:
- # in order not to distribute .info files.
- # (2) When the undocumented option 'info-in-builddir' is given.
- # This is done to allow the developers of GCC, GDB, GNU
- # binutils and the GNU bfd library to force the '.info' files
- # to be generated in the builddir rather than the srcdir, as
- # was once done when the (now removed) 'cygnus' option was
- # given. See automake bug#11034 for more discussion.
- my $insrc = 1;
- my $soutdir = '$(srcdir)/' . $outdir;
-
- if (option 'info-in-builddir')
- {
- $insrc = 0;
- }
- elsif ($out_file =~ $user_cleaned_files)
- {
- $insrc = 0;
- msg 'obsolete', "$am_file.am", <<EOF;
-Oops!
- It appears this file (or files included by it) are triggering
- an undocumented, soon-to-be-removed automake hack.
- Future automake versions will no longer place in the builddir
- (rather than in the srcdir) the generated '.info' files that
- appear to be cleaned, by e.g. being listed in CLEANFILES or
- DISTCLEANFILES.
- If you want your '.info' files to be placed in the builddir
- rather than in the srcdir, you have to use the shiny new
- 'info-in-builddir' automake option.
-EOF
- }
-
- $outdir = $soutdir if $insrc;
+ # off when the automake option 'info-in-builddir' is given.
+ # This is done to allow the developers of GCC, GDB, GNU
+ # binutils and the GNU bfd library to force the '.info' files
+ # to be generated in the builddir rather than the srcdir, as
+ # was once done when the (now removed) 'cygnus' option was
+ # given. See automake bug#11034 for more discussion.
+ my $insrc = ! option 'info-in-builddir';
+ $outdir = $src_outdir if $insrc;
# If user specified file_TEXINFOS, then use that as explicit
# dependency list.
@texi_deps = ();
- push (@texi_deps, "${soutdir}${vtexi}") if $vtexi;
+ push (@texi_deps, "${src_outdir}${vtexi}") if $vtexi;
my $canonical = canonicalize ($infobase);
if (var ($canonical . "_TEXINFOS"))
@@ -3187,8 +3147,8 @@ EOF
new Automake::Location,
TEXI => $texi,
VTI => $vti,
- STAMPVTI => "${soutdir}stamp-$vti",
- VTEXI => "$soutdir$vtexi",
+ STAMPVTI => "${src_outdir}stamp-$vti",
+ VTEXI => "${src_outdir}$vtexi",
MDDIR => $conf_dir,
DIRSTAMP => $dirstamp);
}