automake-patches
[Top][All Lists]
Advanced

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

Add support for generating HTML docs a` la PDF, etc.


From: Richard Dawe
Subject: Add support for generating HTML docs a` la PDF, etc.
Date: Mon, 24 Feb 2003 22:04:36 +0000

Hello.

Below is a patch that adds HTML documentation generation in a similar way
to PDF, PostScript, etc. - by adding 'html' targets for texinfo sources
from info_TEXINFOS.

I know this is different to the way proposed in TODO. I read TODO
afterwards. ;)

For consistency, if an html_TEXINFOS thing (primary?) is added,
it seems that there should be pdf_TEXINFOS, etc. too.

This patch also does not update the example given about html_DATA
in the automake.texi manual. So this patch isn't complete - it's
more a conversation starter. ;)

Bye, Rich =]

Index: ChangeLog
===================================================================
RCS file: /cvs/automake/automake/ChangeLog,v
retrieving revision 1.2171
diff -p -u -3 -r1.2171 ChangeLog
--- ChangeLog   23 Feb 2003 18:51:57 -0000      1.2171
+++ ChangeLog   24 Feb 2003 21:52:22 -0000
@@ -1,3 +1,19 @@
+2003-02-24  Richard Dawe  <address@hidden>
+
+       * automake.in (output_texinfo_build_rules, handle_texinfo_helper):
+       Add infrastructure for generating HTML documentation
+       from texinfo source.
+       * lib/am/texinfos.am: Add rules for building HTML documentation
+       from texinfo source.
+       * lib/am/texibuild.am: Likewise.
+       * automake.texi (Texinfo): Document rules for building
+       HTML documentation from texinfo source.
+       * tests/txinfo21.test: New file.
+       * tests/Makefile.am (TESTS): Add txinfo21.test.
+
+       * tests/version7.test: Use $sleep to sleep before updating
+       the version, to work around timestamp inconsistencies in Windows.
+
 2003-02-23  Alexandre Duret-Lutz  <address@hidden>
 
        * automake.texi (FAQ, CVS, maintainer-mode, wildcards)
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1434
diff -p -u -3 -r1.1434 automake.in
--- automake.in 11 Feb 2003 19:32:36 -0000      1.1434
+++ automake.in 24 Feb 2003 21:53:00 -0000
@@ -3763,7 +3763,7 @@ sub output_texinfo_build_rules ($$@)
                                    MAKEINFOFLAGS => $makeinfoflags,
                                    DEPS          => "@deps",
                                   DIRSTAMP      => $dirstamp);
-  return ($dirstamp, "$dpfx.dvi", "$dpfx.pdf", "$dpfx.ps");
+  return ($dirstamp, "$dpfx.dvi", "$dpfx.pdf", "$dpfx.ps", "$dpfx.html");
 }
 
 
@@ -3780,7 +3780,8 @@ sub handle_texinfo_helper
 
     my @texis = &variable_value_as_list_recursive ('info_TEXINFOS', 'all');
 
-    my (@info_deps_list, @dvis_list, @pdfs_list, @pss_list, @texi_deps);
+    my (@info_deps_list, @texi_deps);
+    my (@dvis_list, @pdfs_list, @pss_list, @htmls_list);
     my %versions;
     my $done = 0;
     my @texi_cleans;
@@ -3833,6 +3834,7 @@ sub handle_texinfo_helper
        push (@dvis_list, $infobase . '.dvi');
        push (@pdfs_list, $infobase . '.pdf');
        push (@pss_list, $infobase . '.ps');
+       push (@htmls_list, $infobase . '.html');
 
        # If a vers*.texi file is needed, emit the rule.
        if ($vtexi)
@@ -3926,6 +3928,7 @@ sub handle_texinfo_helper
     &define_variable ("DVIS", "@dvis_list", INTERNAL);
     &define_variable ("PDFS", "@pdfs_list", INTERNAL);
     &define_variable ("PSS", "@pss_list", INTERNAL);
+    &define_variable ("HTMLS", "@htmls_list", 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
     # probably better, in case noinst_TEXINFOS is ever supported.
Index: lib/am/texinfos.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/texinfos.am,v
retrieving revision 1.101
diff -p -u -3 -r1.101 texinfos.am
--- lib/am/texinfos.am  19 Feb 2003 19:12:55 -0000      1.101
+++ lib/am/texinfos.am  24 Feb 2003 21:53:10 -0000
@@ -59,18 +59,21 @@ DVIPS = dvips
        $(DVIPS) -o $@ $<
 endif %?LOCAL-TEXIS%
 
-.PHONY: info info-am dvi dvi-am pdf pdf-am
+.PHONY: info info-am dvi dvi-am pdf pdf-am html html-am
 if %?SUBDIRS%
 RECURSIVE_TARGETS += info-recursive dvi-recursive pdf-recursive ps-recursive
+RECURSIVE_TARGETS += html-recursive
 .PHONY info: info-recursive
 .PHONY dvi: dvi-recursive
 .PHONY pdf: pdf-recursive
 .PHONY ps: ps-recursive
+.PHONY html: html-recursive
 else !%?SUBDIRS%
 info: info-am
 dvi: dvi-am
 pdf: pdf-am
 ps: ps-am
+html: html-am
 endif !%?SUBDIRS%
 
 if %?LOCAL-TEXIS%
@@ -78,11 +81,13 @@ info-am: $(INFO_DEPS)
 dvi-am: $(DVIS)
 pdf-am: $(PDFS)
 ps-am: $(PSS)
+html-am: $(HTMLS)
 else ! %?LOCAL-TEXIS%
 info-am:
 dvi-am:
 pdf-am:
 ps-am:
+html-am:
 endif ! %?LOCAL-TEXIS%
 
 
Index: lib/am/texibuild.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/texibuild.am,v
retrieving revision 1.14
diff -p -u -3 -r1.14 texibuild.am
--- lib/am/texibuild.am 20 Feb 2003 16:49:44 -0000      1.14
+++ lib/am/texibuild.am 24 Feb 2003 21:53:11 -0000
@@ -54,6 +54,11 @@
 ?GENERIC?      $(TEXI2PDF) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
 ?!GENERIC?     $(TEXI2PDF) -o $@ `test -f '%SOURCE%' || echo 
'$(srcdir)/'`%SOURCE%
 
+?GENERIC?%SOURCE_SUFFIX%.html:
+?!GENERIC?%DEST_PREFIX%.html: %SOURCE% %DEPS% %DIRSTAMP%
+       $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) --html --no-split 
%MAKEINFOFLAGS% \
+        -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
+
 ## If we are using the generic rules, we need separate dependencies.
 ## (Don't wonder about %DIRSTAMP% here, this is used only by non-generic
 ## rules.)
@@ -63,4 +68,5 @@ endif %?GENERIC_INFO%
 if %?GENERIC%
 %DEST_PREFIX%.dvi: %SOURCE_REAL% %DEPS%
 %DEST_PREFIX%.pdf: %SOURCE_REAL% %DEPS%
+%DEST_PREFIX%.html: %SOURCE_REAL% %DEPS%
 endif %?GENERIC%
Index: automake.texi
===================================================================
RCS file: /cvs/automake/automake/automake.texi,v
retrieving revision 1.324
diff -p -u -3 -r1.324 automake.texi
--- automake.texi       23 Feb 2003 18:51:57 -0000      1.324
+++ automake.texi       24 Feb 2003 21:53:45 -0000
@@ -4000,11 +4000,11 @@ for new manuals.
 @vindex info_TEXINFOS
 
 Automake generates rules to build @file{.info}, @file{.dvi}, @file{.ps},
-and @file{.pdf} files from your Texinfo sources.  The @file{.info} files
-are built by @code{make all} and installed by @code{make install}
-(unless you use @code{no-installinfo}, see below).  The other files can
-be built on request by @code{make dvi}, @code{make ps}, and @code{make
-pdf}.
address@hidden and @file{.html} files from your Texinfo sources.
+The @file{.info} files are built by @code{make all} and installed
+by @code{make install} (unless you use @code{no-installinfo}, see below).
+The other files can be built on request by @code{make dvi}, @code{make ps},
address@hidden pdf} and @code{make html}.
 
 @cindex Texinfo flag, VERSION
 @cindex Texinfo flag, UPDATED
@@ -5271,6 +5271,8 @@ with these user-supplied targets.
 @trindex  ps-local
 @trindex  pdf
 @trindex  pdf-local
address@hidden  html
address@hidden  html-local
 @trindex  check
 @trindex  check-local
 @trindex  install
@@ -5291,9 +5293,9 @@ with these user-supplied targets.
 @trindex  installcheck-local
 
 The targets that support a local version are @code{all}, @code{info},
address@hidden, @code{ps}, @code{pdf}, @code{check}, @code{install-data},
address@hidden, @code{uninstall}, @code{installdirs},
address@hidden and the various @code{clean} targets
address@hidden, @code{ps}, @code{pdf}, @code{html}, @code{check},
address@hidden, @code{install-exec}, @code{uninstall},
address@hidden, @code{installcheck} and the various @code{clean} targets
 (@code{mostlyclean}, @code{clean}, @code{distclean}, and
 @code{maintainer-clean}).  Note that there are no
 @code{uninstall-exec-local} or @code{uninstall-data-local} targets; just
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.471
diff -p -u -3 -r1.471 Makefile.am
--- tests/Makefile.am   19 Feb 2003 19:12:56 -0000      1.471
+++ tests/Makefile.am   24 Feb 2003 21:53:51 -0000
@@ -425,6 +425,7 @@ txinfo16.test \
 txinfo17.test \
 txinfo18.test \
 txinfo19.test \
+txinfo21.test \
 transform.test \
 unused.test \
 vars.test \
--- /dev/null   2003-02-24 22:00:51.000000000 +0000
+++ tests/txinfo21.test 2003-02-24 19:33:24.000000000 +0000
@@ -0,0 +1,49 @@
+#! /bin/sh
+# Copyright (C) 2003  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Test support for building HTML documentation.
+
+required='makeinfo tex'
+. ./defs || exit 1
+
+set -e
+
+echo AC_OUTPUT >> configure.in
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = main.texi
+END
+
+cat > main.texi << 'END'
+\input texinfo
address@hidden main.info
address@hidden main
address@hidden Top
+Hello walls.
address@hidden
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+./configure
+$MAKE html
+test -f main.html





reply via email to

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