[Scummvm-cvs-logs] SF.net SVN: scummvm: [25007] docs/trunk/docbook
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Jan 5 22:49:02 CET 2007
Revision: 25007
http://scummvm.svn.sourceforge.net/scummvm/?rev=25007&view=rev
Author: fingolfin
Date: 2007-01-05 13:49:01 -0800 (Fri, 05 Jan 2007)
Log Message:
-----------
Revised and split the Makefile (WIP)
Modified Paths:
--------------
docs/trunk/docbook/Makefile
docs/trunk/docbook/README
Added Paths:
-----------
docs/trunk/docbook/Makefile.common
docs/trunk/docbook/Makefile.xsltproc
Modified: docs/trunk/docbook/Makefile
===================================================================
--- docs/trunk/docbook/Makefile 2007-01-05 18:16:05 UTC (rev 25006)
+++ docs/trunk/docbook/Makefile 2007-01-05 21:49:01 UTC (rev 25007)
@@ -1,3 +1,5 @@
+include Makefile.common
+
# FIXME: The following path works fine on my (Fingolfin's) system,
# because that is where the Fink openjade package puts it.
# But of course it'll be in some other place on other systems.
@@ -3,56 +5,9 @@
# I dunno right now how to set it up portably right now :-/
DCL = -l /sw/share/sgml/openjade-1.3.2/pubtext/xml.dcl
+#DCL = -l /usr/share/sgml/declaration/xml.dcl
+#DCL = --cat docbook-xml-4.2/docbook.cat -l /usr/share/sgml/xml.dcl
-# Settings for the modern XSL/FOP based toolchain.
-# FIXME: This, too, is tuned for Fink / OS X
-DOCBOOK_XSL = /sw/share/xml/xsl/docbook-xsl
-
-
#
-# Everything after here *should* be portable.
-#
-
-MANUAL_DST = manual.html manual.txt manual/index.html manual.pdf
-DEVGUIDE_DST = devguide.html devguide.txt devguide/index.html devguide.pdf
-FAQ_DST = faq.html faq.txt faq.pdf faq.inc
-
-all: $(MANUAL_DST) $(DEVGUIDE_DST) $(FAQ_DST)
-
-clean:
- rm $(MANUAL_DST)
- rm $(DEVGUIDE_DST)
- rm $(FAQ_DST)
- rm -rf devguide manual
-
-# Validate the XML
-check:
- xmllint devguide.xml > /dev/null
- xmllint faq.xml > /dev/null
- xmllint manual.xml > /dev/null
-
-
-$(MANUAL_DST): credits.xml
-
-#
-# For the PDF version of the manual, some of the images should be converted to
-# from PNG to PDF. The following rule does that using ImageMagick.
-#
-manual.pdf: img/launcher-after-add.pdf
-manual.pdf: img/launcher-browser.pdf
-#manual.pdf: img/launcher-edit-audio.pdf
-manual.pdf: img/launcher-edit-game.pdf
-#manual.pdf: img/launcher-edit-gfx.pdf
-#manual.pdf: img/launcher-edit-paths.pdf
-#manual.pdf: img/launcher-edit-volume.pdf
-manual.pdf: img/launcher-empty.pdf
-manual.pdf: img/launcher-options-graphics.pdf
-manual.pdf: img/launcher-options-audio.pdf
-manual.pdf: img/launcher-options-misc.pdf
-
-img/%.pdf: img/%.png
- convert $< $@
-
-#
# The following rules convert our DocBook XML into various target formats
# with the help of the docbook-utils package. That in turn uses jadetex.
@@ -73,11 +28,10 @@
tidy -qm $*/*.html || true
%.html: %.xml
- docbook2html $(DCL) -u $<
+ docbook2html $(DCL) --nochunks $<
tidy -qm $@ || true
-
# Special rule for faq.inc:
# Remove everything before <div class="qandaset">
# and at the end of the file remove
@@ -85,36 +39,3 @@
# </html>
faq.inc: faq.html
./faq_make_inc.pl < $< > $@
-
-
-
-#
-# 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.
-#
Added: docs/trunk/docbook/Makefile.common
===================================================================
--- docs/trunk/docbook/Makefile.common (rev 0)
+++ docs/trunk/docbook/Makefile.common 2007-01-05 21:49:01 UTC (rev 25007)
@@ -0,0 +1,51 @@
+# For convenience and ease of use, we include our own private copy
+# of the DocBook XML 4.2 files.
+SGML_CATALOG_FILES=$(PWD)/docbook-xml-4.2/catalog.xml
+
+#
+# Everything after here *should* be portable.
+#
+
+MANUAL_DST = manual.html manual.txt manual/index.html manual.pdf
+DEVGUIDE_DST = devguide.html devguide.txt devguide/index.html devguide.pdf
+FAQ_DST = faq.html faq.txt faq.pdf faq.inc
+
+all: $(MANUAL_DST) $(DEVGUIDE_DST) $(FAQ_DST)
+
+clean:
+ rm $(MANUAL_DST)
+ rm $(DEVGUIDE_DST)
+ rm $(FAQ_DST)
+ rm -rf devguide manual
+
+#
+# Validate the XML using xmllint (part of libxml2)
+#
+check:
+ SGML_CATALOG_FILES=$(SGML_CATALOG_FILES) \
+ xmllint --catalogs --noout devguide.xml
+ SGML_CATALOG_FILES=$(SGML_CATALOG_FILES) \
+ xmllint --catalogs --noout faq.xml
+ SGML_CATALOG_FILES=$(SGML_CATALOG_FILES) \
+ xmllint --catalogs --noout manual.xml
+
+$(MANUAL_DST): credits.xml
+
+#
+# For the PDF version of the manual, some of the images should be converted to
+# from PNG to PDF. The following rule does that using ImageMagick.
+#
+manual.pdf: img/launcher-after-add.pdf
+manual.pdf: img/launcher-browser.pdf
+#manual.pdf: img/launcher-edit-audio.pdf
+manual.pdf: img/launcher-edit-game.pdf
+#manual.pdf: img/launcher-edit-gfx.pdf
+#manual.pdf: img/launcher-edit-paths.pdf
+#manual.pdf: img/launcher-edit-volume.pdf
+manual.pdf: img/launcher-empty.pdf
+manual.pdf: img/launcher-options-graphics.pdf
+manual.pdf: img/launcher-options-audio.pdf
+manual.pdf: img/launcher-options-misc.pdf
+
+img/%.pdf: img/%.png
+ convert $< $@
Property changes on: docs/trunk/docbook/Makefile.common
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Rev Author URL Id
Name: svn:eol-style
+ native
Added: docs/trunk/docbook/Makefile.xsltproc
===================================================================
--- docs/trunk/docbook/Makefile.xsltproc (rev 0)
+++ docs/trunk/docbook/Makefile.xsltproc 2007-01-05 21:49:01 UTC (rev 25007)
@@ -0,0 +1,41 @@
+include Makefile.common
+
+# Settings for the modern XSL/FOP based toolchain.
+# FIXME: This path is tuned for Fink / OS X
+DOCBOOK_XSL = /sw/share/xml/xsl/docbook-xsl
+#DOCBOOK_XSL = /usr/share/sgml/docbook/stylesheet/xsl/nwalsh
+#DOCBOOK_XSL = docbook-xsl-1.71.1
+
+
+
+#
+# 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 = --catalogs --stringparam draft.mode no --stringparam paper.type A4
+
+%.html: %.xml
+ SGML_CATALOG_FILES=$(SGML_CATALOG_FILES) \
+ xsltproc $(XSL_PARAM) --output $@ $(DOCBOOK_XSL)/html/docbook.xsl $<
+
+%.xhtml: %.xml
+ SGML_CATALOG_FILES=$(SGML_CATALOG_FILES) \
+ xsltproc $(XSL_PARAM) --output $@ $(DOCBOOK_XSL)/xhtml/docbook.xsl $<
+
+%.fo: %.xml
+ SGML_CATALOG_FILES=$(SGML_CATALOG_FILES) \
+ xsltproc $(XSL_PARAM) --output $@ $(DOCBOOK_XSL)/fo/docbook.xsl $<
+
+%.pdf: %.fo
+ fop $< -pdf $@
+
+%.txt: %.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.
+#
Property changes on: docs/trunk/docbook/Makefile.xsltproc
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Rev Author URL Id
Name: svn:eol-style
+ native
Modified: docs/trunk/docbook/README
===================================================================
--- docs/trunk/docbook/README 2007-01-05 18:16:05 UTC (rev 25006)
+++ docs/trunk/docbook/README 2007-01-05 21:49:01 UTC (rev 25007)
@@ -26,7 +26,7 @@
Both toolchains can be used for our purposes; the Makefile by default
uses the "old" docbook-utils / jadetex chain. But there are also rules
for using the newer XSLT+FOP chain: Just invoke
- make manual.xsl.html
+ make -f Makefile.xsltproc
to use xsltproc + fop.
I have no idea how to proceed on Windows; probably your best bet is using
@@ -35,23 +35,40 @@
Mac OS X with Fink
------------------
-For the classic tool chain, you need to install the
+There are several ways to produce HTML, PDF etc. from the DocBook sources when
+using Fink on Mac OS X. I'll outline four of them below. Independent of these,
+the "make check" requires the "xmllint" tool which is part of the "libxml2-bin"
+package. Also, if you installed Fink in a non-standard location (i.e. not under /sw),
+you will have to edit the Makefile slightly.
+Finally note that more ways exist, e.g. you could use 4suite.
+
+1) Classic tool chain
+You need to install the
docbook-bundle
docbook-utils
tidy (for post-processing)
packages (which in turn will install, amongst others, the "docbook-dtd"
-and "openjade" packages).
+and "openjade" packages). Then, simply type "make" to invoke the Makefile.
-For the modern tool chain, install
+2) Modern (XSLT+FOP) tool chain
+Install
libxslt-bin (for xsltproc)
fop
+ docbook-dtd
docbook-xsl
+Then, invoke "make manual.xsl.html", "make manual.xsl.pdf" etc. to create output
+(this is admittedly not the nicest way to handle this).
-For "make check" to work (which uses "xmllint"), you will also need to install
- libxml2-bin
+3) xmlto
+Install the "xmlto" package (which will also install most of the packages from
+the modern tool chain). Then, you can convert the DocBook sources via commands
+like this:
+ xmlto html-nochunks manual.xml
+ xmlto pdf faq.xml
-Finally, if you installed Fink in a non-standard location (i.e. not under /sw),
-you will have to edit the Makefile slightly.
+4) dblatex (only for DVI, PDF and Postscript output)
+Install the "dblatex" package. Then a typical command to invoke is
+ dblatex --pdf manual.xml
What needs to be done?
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list