]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] automake: merge handle_texinfo_source() -> handle_texinfo_helper()
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 16 Jun 2012 19:20:32 +0000 (21:20 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 17 Jun 2012 08:23:14 +0000 (10:23 +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): Delete, has been merged ...
(handle_texinfo_helper): ... in here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
automake.in

index e32367a1774ffe67ee958dc2fa06438feab21bd4..cdc2579867a4545749d47a35c659d701cc19196c 100644 (file)
@@ -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)