[Scummvm-cvs-logs] CVS: docs/docbook Makefile,1.3,1.4
Max Horn
fingolfin at users.sourceforge.net
Mon Dec 20 17:18:02 CET 2004
Update of /cvsroot/scummvm/docs/docbook
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17820
Modified Files:
Makefile
Log Message:
Added another set of rules, to build the manual using docbook-xsl
Index: Makefile
===================================================================
RCS file: /cvsroot/scummvm/docs/docbook/Makefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Makefile 5 Dec 2004 01:56:42 -0000 1.3
+++ Makefile 21 Dec 2004 01:17:13 -0000 1.4
@@ -4,6 +4,8 @@
# I dunno right now how to set it up portably right now :-/
DCL = -l /sw/share/sgml/openjade-1.3.2/pubtext/xml.dcl
+DOCBOOK_XSL = /sw/share/xml/xsl/docbook-xsl
+
all: manual.html manual.txt manual/index.html manual.pdf
all: devguide.html devguide.txt devguide/index.html devguide.pdf
all: faq.html faq.txt faq.pdf
@@ -14,6 +16,19 @@
rm -rf devguide manual
rm faq.html faq.txt faq.pdf
+# Validate the XML
+check:
+ xmllint devguide.xml > /dev/null
+ xmllint faq.xml > /dev/null
+ xmllint manual.xml > /dev/null
+
+#
+# The following rules convert our DocBook XML into various target formats
+# with the help of the docbook-utils package. That in turn uses jadetex.
+# Note that the plain text version apparently is simply made by using a text
+# based web client (links, lynx, w3m, ...) on the single page HTML version.
+#
+
%.pdf: %.xml
docbook2pdf $(DCL) $<
@@ -28,3 +43,36 @@
%.html: %.xml
docbook2html $(DCL) -u $<
tidy -qm $@ || true
+
+
+
+#
+# This second set of rules uses docbook-xsl and xsltproc (from libxslt)
+# as well as fop to create HTML, XHTML and PDF output.
+#
+
+XSL_PARAM = --stringparam draft.mode no
+XSL_FO_PARAM = $(XSL_PARAM) --stringparam paper.type A4
+
+manual.xsl.html: manual.xml
+ xsltproc $(XSL_PARAM) $(DOCBOOK_XSL)/html/docbook.xsl $< > $@
+
+manual.xsl.xhtml: manual.xml
+ xsltproc $(XSL_PARAM) $(DOCBOOK_XSL)/xhtml/docbook.xsl $< > $@
+
+manual.xsl.fo: manual.xml
+ xsltproc $(XSL_FO_PARAM) $(DOCBOOK_XSL)/fo/docbook.xsl $< > $@
+
+manual.xsl.pdf: manual.xsl.fo
+ fop $< -pdf $@
+
+manual.xsl.txt: manual.xsl.fo
+ fop $< -txt $@
+
+
+#
+# Some more notes: Of course we can also use a tool like htmldoc to convert
+# HTML to PDF (though the quality is IMO not as good as that of the two ways
+# above).
+# Also, there is room for experiments when it comes to the plain text generation.
+#
More information about the Scummvm-git-logs
mailing list