Author: ludo
Date: Mon Jul  4 14:48:38 2011
New Revision: 27599
URL: https://svn.nixos.org/websvn/nix/?rev=27599&sc=1

Log:
Build the HTML manual; add the HTML & PDF to the distribution; install them.

* doc/manual/Makefile.am (dist_html_DATA, dist_pdf_DATA): New variables.
  (manual.html): New target.
  (manual.pdf): Use $(DBLATEX), uppercase.

* configure.ac: Check for `xsltproc'.  Add `--with-docbook-xsl' option.

Modified:
   hydra/trunk/configure.ac
   hydra/trunk/doc/manual/Makefile.am

Modified: hydra/trunk/configure.ac
==============================================================================
--- hydra/trunk/configure.ac    Mon Jul  4 14:44:54 2011        (r27598)
+++ hydra/trunk/configure.ac    Mon Jul  4 14:48:38 2011        (r27599)
@@ -10,7 +10,17 @@
 AC_PROG_LIBTOOL
 AC_PROG_CXX
 
-AC_PATH_PROG(dblatex, dblatex)
+dnl Optional dependencies to build the manual, normally not needed
+dnl since the tarball comes with the PDF and HTML manuals.
+AC_PATH_PROG([DBLATEX], [dblatex])
+AC_PATH_PROG([XSLTPROC], [xsltproc])
+
+AC_ARG_WITH([docbook-xsl],
+  [AS_HELP_STRING([--with-docbook-xsl=PATH],
+    [path of the DocBook XSL stylesheets])],
+  [docbookxsl="$withval"],
+  [docbookxsl="/docbook-xsl-missing"])
+AC_SUBST([docbookxsl])
 
 
 AC_DEFUN([NEED_PROG],

Modified: hydra/trunk/doc/manual/Makefile.am
==============================================================================
--- hydra/trunk/doc/manual/Makefile.am  Mon Jul  4 14:44:54 2011        (r27598)
+++ hydra/trunk/doc/manual/Makefile.am  Mon Jul  4 14:48:38 2011        (r27599)
@@ -7,9 +7,22 @@
  -P doc.collab.show=0 \
  -P latex.output.revhistory=0
 
+# Include the manual in the tarball.
+dist_html_DATA = manual.html
+dist_pdf_DATA = manual.pdf
+
+manual.html: $(DOCBOOK_FILES)
+       if test "$(XSLTPROC)" != ""; then                               \
+               $(XSLTPROC) --nonet --xinclude --output manual.html     \
+                  $(docbookxsl)/html/docbook.xsl manual.xml;           \
+       else                                                            \
+               @echo "Please install xsltproc and rerun configure.";   \
+               exit 1;                                                 \
+       fi
+
 manual.pdf : $(DOCBOOK_FILES)
-       if test "$(dblatex)" != ""; then \
-               $(dblatex) $(dblatex_opts) manual.xml; \
+       if test "$(DBLATEX)" != ""; then \
+               $(DBLATEX) $(dblatex_opts) manual.xml; \
        else \
                echo "Please install dblatex and rerun configure."; \
                exit 1; \
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to