[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-NG] [PATCH 23/26] [ng] automake: merge handle_texinfo_source()
From: |
Stefano Lattarini |
Subject: |
[Automake-NG] [PATCH 23/26] [ng] automake: merge handle_texinfo_source() -> handle_texinfo_helper() |
Date: |
Sat, 16 Jun 2012 23:30:10 +0200 |
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): Deleted, merged ...
(handle_texinfo_helper): ... in here.
Signed-off-by: Stefano Lattarini <address@hidden>
---
automake.in | 50 ++++++++++++++++----------------------------------
1 file changed, 16 insertions(+), 34 deletions(-)
diff --git a/automake.in b/automake.in
index cfba415..1f12093 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)
--
1.7.9.5
- Re: [Automake-NG] [PATCH 17/26] [ng] texi: always look for mdate-sh in the build-aux directory ..., (continued)
- [Automake-NG] [PATCH 19/26] [ng] automake: remove two unused variables from '&handle_texinfo_source', Stefano Lattarini, 2012/06/16
- [Automake-NG] [PATCH 21/26] [ng] texi: move some more knowledge from automake to texi-spec.am, Stefano Lattarini, 2012/06/16
- [Automake-NG] [PATCH 22/26] [ng] texi: simplify handle_texinfo_source by assuming '.info' suffix ..., Stefano Lattarini, 2012/06/16
- [Automake-NG] [PATCH 23/26] [ng] automake: merge handle_texinfo_source() -> handle_texinfo_helper(),
Stefano Lattarini <=
- [Automake-NG] [PATCH 20/26] [ng] texi: in texi-spec.am, assume suffix for info files is always '.info', Stefano Lattarini, 2012/06/16
- [Automake-NG] [PATCH 24/26] [ng] texi: "de-prettify" makeinfo command line, Stefano Lattarini, 2012/06/16
- [Automake-NG] [PATCH 25/26] [ng] texi: move more code from automake to Makefile, Stefano Lattarini, 2012/06/16
- [Automake-NG] [PATCH 26/26] [ng] texi: remove some crufty code to support obsolete environment, Stefano Lattarini, 2012/06/16