From: Stefano Lattarini Date: Sat, 16 Jun 2012 19:20:32 +0000 (+0200) Subject: [ng] automake: merge handle_texinfo_source() -> handle_texinfo_helper() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a7a87ccc2dc855a393a1209cdd6c74b3bfa93e7;p=thirdparty%2Fautomake.git [ng] automake: merge handle_texinfo_source() -> handle_texinfo_helper() The former subroutine has been so reduced in scope and size that it is just easier to merge it with the bigger one. * automake.in (handle_texinfo_source): Delete, has been merged ... (handle_texinfo_helper): ... in here. Signed-off-by: Stefano Lattarini --- diff --git a/automake.in b/automake.in index e32367a17..cdc257986 100644 --- a/automake.in +++ b/automake.in @@ -2840,36 +2840,6 @@ sub scan_texinfo_file ($) map { "$infobase.$_" } (sort keys %clean_suffixes)); } - -# @CLEAN_FILES -# handle_texinfo_source ($SOURCE, $DEST, $INSRC, @DEPENDENCIES) -# ------------------------------------------------------------------ -# SOURCE - the source Texinfo file -# DEST - the destination Info file -# INSRC - whether DEST should be built in the source tree -# DEPENDENCIES - known dependencies -sub handle_texinfo_source ($$$@) -{ - my ($source, $dest, $insrc, @deps) = @_; - - my $sdir = dirname $source; - my $makeinfoflags = ($sdir eq '.' && dirname ($dest) eq '.') - ? '-I $(srcdir)' - : "-I $sdir -I \$(srcdir)/$sdir"; - - (my $dpfx = $dest) =~ s/\.info$//; - $output_rules .= file_contents ('texi-spec', - new Automake::Location, - DEPS => "@deps", - DEST_PREFIX => $dpfx, - INSRC => $insrc, - MAKEINFOFLAGS => $makeinfoflags, - SOURCE_REAL => $source, - ); - return ("$dpfx.dvi", "$dpfx.pdf", "$dpfx.ps", "$dpfx.html"); -} - - # ($MOSTLYCLEAN, $TEXICLEAN, $MAINTCLEAN) # handle_texinfo_helper ($info_texinfos) # -------------------------------------- @@ -3037,11 +3007,23 @@ sub handle_texinfo_helper ($) push_dist_common ('$(' . $canonical . '_TEXINFOS)'); } - my @cfiles = handle_texinfo_source ($texi, $out_file, - $insrc, @texi_deps); - push (@texi_cleans, @cfiles); + my $sdir = dirname $texi; + my $makeinfoflags = ($sdir eq '.' && dirname ($out_file) eq '.') + ? '-I $(srcdir)' + : "-I $sdir -I \$(srcdir)/$sdir"; + + (my $dpfx = $out_file) =~ s/\.info$//; + $output_rules .= file_contents ('texi-spec', + new Automake::Location, + DEPS => "@texi_deps", + DEST_PREFIX => $dpfx, + INSRC => $insrc, + MAKEINFOFLAGS => $makeinfoflags, + SOURCE_REAL => $texi, + ); - push (@info_deps_list, $out_file); + push @texi_cleans, "$dpfx.dvi", "$dpfx.pdf", "$dpfx.ps", "$dpfx.html"; + push @info_deps_list, $out_file; # If a vers*.texi file is needed, emit the rule. if ($vtexi)