automake-patches
[Top][All Lists]
Advanced

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

03texi2txt.diff


From: derek
Subject: 03texi2txt.diff
Date: 7 Aug 2003 19:13:37 -0000

CVS has had rules in its doc/Makefile.am for awhile to generate .txt files from
texinfos.  Basically it just requires the passage of --no-headers to makeinfo.

I've included a patch that uses the dvi, info, pdf, and ps targets as a model
to define txt targets that build .txt files from all texinfos.

Let me know if you'd like this committed.

Derek


Index: ChangeLog

2003-08-07  Derek Price  <address@hidden>

        * automake.in (%required_targets): Add txt & txt-am.
        (initialize_per_input): Initialize txt dependencies.
        (output_texinfo_build_rules): Generate .txt rules.
        (handle_texinfo_helper): Define TXTS.
        * lib/am/texibuild.am: Add .txt suffix rule.
        * lib/am/texinfos.am: txt and txt-am are new PHONYs.
        (MAKETEXT): New macro.
        (RECURSIVE_TARGETS): Add txt-recursive.
        (txt-am): Depend on $(TXTS).

Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1495
diff -u -r1.1495 automake.in
--- automake.in 7 Aug 2003 00:32:29 -0000       1.1495
+++ automake.in 7 Aug 2003 19:00:14 -0000
@@ -394,6 +394,7 @@
    'dvi'         => 1,
    'pdf'         => 1,
    'ps'                  => 1,
+   'txt'         => 1,
    'info'        => 1,
    'install-info' => 1,
    'install'      => 1,
@@ -407,6 +408,7 @@
    'dvi-am'          => 1,
    'pdf-am'          => 1,
    'ps-am'           => 1,
+   'txt-am'          => 1,
    'info-am'         => 1,
    'install-data-am' => 1,
    'install-exec-am' => 1,
@@ -719,6 +721,8 @@
        'pdf-am'   => [],
        'ps'       => [],
        'ps-am'    => [],
+       'txt'      => [],
+       'txt-am'   => [],
        'info'     => [],
        'info-am'  => [],
        'html'     => [],
@@ -2945,7 +2949,8 @@
                                  MAKEINFOFLAGS => $makeinfoflags,
                                  DEPS          => "@deps",
                                  DIRSTAMP      => $dirstamp);
-  return ($dirstamp, "$dpfx.dvi", "$dpfx.pdf", "$dpfx.ps", "$dpfx.html");
+  return ($dirstamp, "$dpfx.dvi", "$dpfx.pdf", "$dpfx.ps", "$dpfx.txt",
+         "$dpfx.html");
 }
 
 
@@ -3098,6 +3103,7 @@
   define_files_variable ("PDFS", @infobase, 'pdf', INTERNAL);
   define_files_variable ("PSS", @infobase, 'ps', INTERNAL);
   define_files_variable ("HTMLS", @infobase, 'html', INTERNAL);
+  define_files_variable ("TXTS", @infobase, 'txt', INTERNAL);
 
   # This next isn't strictly needed now -- the places that look here
   # could easily be changed to look in info_TEXINFOS.  But this is
Index: lib/am/texibuild.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/texibuild.am,v
retrieving revision 1.17
diff -u -r1.17 texibuild.am
--- lib/am/texibuild.am 14 Apr 2003 19:59:30 -0000      1.17
+++ lib/am/texibuild.am 7 Aug 2003 19:00:14 -0000
@@ -53,6 +53,11 @@
        rm -rf $$backupdir; \
        exit $$rc
 
+?GENERIC_INFO?%SOURCE_SUFFIX%.txt:
+?!GENERIC_INFO?%DEST_PREFIX%.txt: %SOURCE_INFO% %DEPS%
+       $(MAKETEXT) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS% \
+        -o $@ `test -f '%SOURCE_INFO%' || echo '$(srcdir)/'`%SOURCE_INFO%
+
 ?GENERIC?%SOURCE_SUFFIX%.dvi:
 ?!GENERIC?%DEST_PREFIX%.dvi: %SOURCE% %DEPS% %DIRSTAMP%
        TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
Index: lib/am/texinfos.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/texinfos.am,v
retrieving revision 1.105
diff -u -r1.105 texinfos.am
--- lib/am/texinfos.am  6 Jul 2003 19:30:46 -0000       1.105
+++ lib/am/texinfos.am  7 Aug 2003 19:00:14 -0000
@@ -44,6 +44,7 @@
 endif %?CYGNUS%
 
 TEXI2PDF = $(TEXI2DVI) --pdf --batch
+MAKETEXT = $(MAKEINFO) --no-headers
 endif %?LOCAL-TEXIS%
 
 
@@ -58,21 +59,23 @@
        $(DVIPS) -o $@ $<
 endif %?LOCAL-TEXIS%
 
-.PHONY: dvi dvi-am html html-am info info-am pdf pdf-am ps ps-am
+.PHONY: dvi dvi-am html html-am info info-am pdf pdf-am ps ps-am txt txt-am
 if %?SUBDIRS%
 RECURSIVE_TARGETS += dvi-recursive html-recursive info-recursive
-RECURSIVE_TARGETS += pdf-recursive ps-recursive
+RECURSIVE_TARGETS += pdf-recursive ps-recursive txt-recursive
 dvi: dvi-recursive
 html: html-recursive
 info: info-recursive
 pdf: pdf-recursive
 ps: ps-recursive
+txt: txt-recursive
 else !%?SUBDIRS%
 dvi: dvi-am
 html: html-am
 info: info-am
 pdf: pdf-am
 ps: ps-am
+txt: txt-am
 endif !%?SUBDIRS%
 
 if %?LOCAL-TEXIS%
@@ -81,12 +84,14 @@
 info-am: $(INFO_DEPS)
 pdf-am: $(PDFS)
 ps-am: $(PSS)
+txt-am: $(TXTS)
 else ! %?LOCAL-TEXIS%
 dvi-am:
 html-am:
 info-am:
 pdf-am:
 ps-am:
+txt-am:
 endif ! %?LOCAL-TEXIS%
 
 




reply via email to

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