automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch 2: support texi2pdf


From: Bonzini
Subject: patch 2: support texi2pdf
Date: Wed, 12 Jun 2002 08:42:31 -0400
User-agent: Mutt/1.3.25i

This patch adds PDF support via texi2dvi's --pdf option.  Triggered 
by `make pdf'

Here is the ChangeLog entry.

2002-05-03      Paolo Bonzini  (address@hidden)

         * automake.in (required_targets): add PDF related targets
         (initialize_per_input): likewise
         (scan_texinfo_file): likewise
         (handle_texinfo_helper): likewise
         * lib/am/texinfos.am: add PDF related targets
         * lib/am/texibuild.am: add PDF related rule


diff -rpC3 automake.old/NEWS automake.pdf/NEWS
*** automake.old/NEWS   Fri May  3 08:17:22 2002
--- automake.pdf/NEWS   Wed Jun 12 08:24:39 2002
***************
*** 1,4 ****
--- 1,5 ----
  New in 1.6a:
+ * PDF files are generated by Automake
  * It is no longuer a requirement to use AM_CONFIG_HEADER instead of
    AC_CONFIG_HEADERS.  AM_CONFIG_HEADER is obsolete.
  * Use Autoconf's --trace interface to inspect configure.ac and get
diff -rpC3 automake.old/automake.in automake.pdf/automake.in
*** automake.old/automake.in    Fri May  3 08:17:22 2002
--- automake.pdf/automake.in    Wed Jun 12 08:05:17 2002
*************** my %required_targets =
*** 386,391 ****
--- 386,392 ----
    (
     'all'          => 1,
     'dvi'        => 1,
+    'pdf'        => 1,
     'info'       => 1,
     'install-info' => 1,
     'install'      => 1,
*************** my %required_targets =
*** 397,402 ****
--- 398,404 ----
     # Well, actually they are sort of required: the -recursive
     # targets will run them anyway...
     'dvi-am'          => 1,
+    'pdf-am'          => 1,
     'info-am'         => 1,
     'install-data-am' => 1,
     'install-exec-am' => 1,
*************** sub initialize_per_input ()
*** 662,667 ****
--- 664,671 ----
         # Texinfoing.
         'dvi'      => [],
         'dvi-am'   => [],
+        'pdf'      => [],
+        'pdf-am'   => [],
         'info'     => [],
         'info-am'  => [],
  
*************** sub scan_texinfo_file
*** 3070,3076 ****
      my ($filename) = @_;
  
      # These are always created, no matter whether indexes are used or not.
!     my @clean_suffixes = qw(aux dvi log ps toc
                            cp fn ky vr tp pg); # grep new.*index texinfo.tex
  
      # There are predefined indexes which don't follow the regular rules.
--- 3074,3080 ----
      my ($filename) = @_;
  
      # These are always created, no matter whether indexes are used or not.
!     my @clean_suffixes = qw(aux dvi log pdf ps toc
                            cp fn ky vr tp pg); # grep new.*index texinfo.tex
  
      # There are predefined indexes which don't follow the regular rules.
*************** sub handle_texinfo_helper
*** 3178,3184 ****
  
      my @texis = &variable_value_as_list_recursive ('info_TEXINFOS', 'all');
  
!     my (@info_deps_list, @dvis_list, @texi_deps);
      my %versions;
      my $done = 0;
      my @texi_cleans;
--- 3182,3188 ----
  
      my @texis = &variable_value_as_list_recursive ('info_TEXINFOS', 'all');
  
!     my (@info_deps_list, @dvis_list, @pdfs_list, @texi_deps);
      my %versions;
      my $done = 0;
      my @texi_cleans;
*************** sub handle_texinfo_helper
*** 3265,3274 ****
--- 3269,3281 ----
                          . "@texi_deps"
                          . "\n" . $infobase . ".dvi: "
                          . "@texi_deps"
+                         . "\n" . $infobase . ".pdf: "
+                         . "@texi_deps"
                          . "\n");
  
        push (@info_deps_list, $out_file);
        push (@dvis_list, $infobase . '.dvi');
+       push (@pdfs_list, $infobase . '.pdf');
      }
  
      # Handle location of texinfo.tex.
*************** sub handle_texinfo_helper
*** 3320,3325 ****
--- 3327,3333 ----
  
      &define_variable ("INFO_DEPS", "@info_deps_list");
      &define_variable ("DVIS", "@dvis_list");
+     &define_variable ("PDFS", "@pdfs_list");
      # This next isn't strictly needed now -- the places that look here
      # could easily be changed to look in info_TEXINFOS.  But this is
      # probably better, in case noinst_TEXINFOS is ever supported.
diff -rpC3 automake.old/lib/am/texibuild.am automake.pdf/lib/am/texibuild.am
*** automake.old/lib/am/texibuild.am    Fri May  3 08:17:22 2002
--- automake.pdf/lib/am/texibuild.am    Wed Jun 12 08:06:52 2002
***************
*** 41,46 ****
--- 41,53 ----
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I 
$(srcdir)' \
        $(TEXI2DVI) $<
  
+ .%SUFFIX%.pdf:
+       TEXINPUTS="%TEXINFODIR%$(PATH_SEPARATOR)$$TEXINPUTS" \
+ ## Must set MAKEINFO like this so that version.texi will be found even
+ ## if it is in srcdir.
+       MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I 
$(srcdir)' \
+       $(TEXI2PDF) $<
+ 
  .%SUFFIX%:
  ## We want to force the .info file to be built in srcdir.  This is
  ## probably the simplest way.  However, at Cygnus .info files are
diff -rpC3 automake.old/lib/am/texinfos.am automake.pdf/lib/am/texinfos.am
*** automake.old/lib/am/texinfos.am     Fri May  3 08:17:22 2002
--- automake.pdf/lib/am/texinfos.am     Wed Jun 12 08:05:17 2002
*************** TEXI2DVI = `if test -f $(top_srcdir)/../
*** 42,47 ****
--- 42,49 ----
               echo texi2dvi; \
             fi`
  endif %?CYGNUS%
+ 
+ TEXI2PDF = $(TEXI2DVI) --pdf
  endif %?LOCAL-TEXIS%
  
  
*************** DVIPS = dvips
*** 56,77 ****
        $(DVIPS) $< -o $@
  endif %?LOCAL-TEXIS%
  
! .PHONY: info info-am dvi dvi-am
  if %?SUBDIRS%
! RECURSIVE_TARGETS += info-recursive dvi-recursive
  .PHONY info: info-recursive
  .PHONY dvi: dvi-recursive
  else !%?SUBDIRS%
  info: info-am
  dvi: dvi-am
  endif !%?SUBDIRS%
  
  if %?LOCAL-TEXIS%
  info-am: $(INFO_DEPS)
  dvi-am: $(DVIS)
  else ! %?LOCAL-TEXIS%
  info-am:
  dvi-am:
  endif ! %?LOCAL-TEXIS%
  
  
--- 58,83 ----
        $(DVIPS) $< -o $@
  endif %?LOCAL-TEXIS%
  
! .PHONY: info info-am dvi dvi-am pdf pdf-am
  if %?SUBDIRS%
! RECURSIVE_TARGETS += info-recursive dvi-recursive pdf-recursive
  .PHONY info: info-recursive
  .PHONY dvi: dvi-recursive
+ .PHONY pdf: pdf-recursive
  else !%?SUBDIRS%
  info: info-am
  dvi: dvi-am
+ pdf: pdf-am
  endif !%?SUBDIRS%
  
  if %?LOCAL-TEXIS%
  info-am: $(INFO_DEPS)
  dvi-am: $(DVIS)
+ pdf-am: $(PDFS)
  else ! %?LOCAL-TEXIS%
  info-am:
  dvi-am:
+ pdf-am:
  endif ! %?LOCAL-TEXIS%
  
  



reply via email to

[Prev in Thread] Current Thread [Next in Thread]