summaryrefslogtreecommitdiff
path: root/bin/automake.in
diff options
context:
space:
mode:
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 d699ec6ee..6f08c4b99 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -2560,15 +2560,6 @@ sub handle_texinfo_helper
my %versions;
my $done = 0;
- # 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))
{
@@ -2599,6 +2590,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
@@ -2689,54 +2681,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"))
@@ -2783,8 +2743,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");
}
}