diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2014-12-28 19:13:40 +0100 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2014-12-28 19:13:40 +0100 |
commit | 8e29fa6bb50d9ab4a8a263c96c51efaa98b169e3 (patch) | |
tree | 5949a611b1a24e5df42021cc2ec74fed0039cb9c /bin/automake.in | |
parent | 85aae58a93a52ce848346797690cf42b73ca9566 (diff) | |
parent | adc17cc491e2b6b1d5e0e966c6f03fed3573b980 (diff) | |
download | automake-8e29fa6bb50d9ab4a8a263c96c51efaa98b169e3.tar.gz |
Merge branch 'master' into ng/master
* master:
tests: make script 'shell-no-trail-bslash' simpler and more robust
texinfo: remove hack about info files in CLEANFILES variables
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'bin/automake.in')
-rw-r--r-- | bin/automake.in | 66 |
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"); } } |