- Add notes about using catalogs (speeds up the docs build!)
authorJelmer Vernooij <jelmer@samba.org>
Mon, 14 Jun 2004 13:47:11 +0000 (13:47 +0000)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 14 Jun 2004 13:47:11 +0000 (13:47 +0000)
- Support building FO and Windows Help files (see:
http://samba.org/~jelmer/samba-chm.png
http://samba.org/~jelmer/samba-chm1.png
http://samba.org/~jelmer/Samba-HOWTO-Collection.chm
)

Makefile.in
README

index 39f3da14b6c971e43f60bfaa652b667b300570ef..f5a96bf7ba0b3deca2448b7b8c6bda1a987a0178 100644 (file)
@@ -32,24 +32,25 @@ LATEX += --interaction nonstopmode
 endif
 
 # Paths
-TOPDIR = $(shell pwd)
-OUTPUTDIR = $(TOPDIR)/output
+OUTPUTDIR = output
 ARCHIVEDIR = $(OUTPUTDIR)/archive
 SRCDIR = @SAMBASOURCEDIR@
 MANDIR = $(OUTPUTDIR)/manpages
 EPSTOPDF = @EPSTOPDF@
-MANPAGEDIR = $(TOPDIR)/manpages
-HOWTODIR = $(TOPDIR)/howto
-GUIDEDOC = $(TOPDIR)/guide
-DEVDOCDIR = $(TOPDIR)/devel
+MANPAGEDIR = manpages
+HOWTODIR = howto
+GUIDEDOC = guide
+DEVDOCDIR = /devel
 MAKEINDEX = @MAKEINDEX@
 IMAGEPROJDIR = $(HOWTODIR)/imagefiles
 IMAGEGUIDEDIR = $(GUIDEDOC)/images
-EXAMPLESDIR = $(TOPDIR)/examples
-SMBDOTCONFDOC = $(TOPDIR)/smbdotconf
+EXAMPLESDIR = examples
+SMBDOTCONFDOC = smbdotconf
 PSDIR = $(OUTPUTDIR)
 PDFDIR = $(OUTPUTDIR)
 DVIDIR = $(OUTPUTDIR)
+FODIR = $(OUTPUTDIR)
+HTMLHELPDIR = $(OUTPUTDIR)/htmlhelp
 VALIDATEDIR = $(OUTPUTDIR)/validate
 TXTDIR = $(OUTPUTDIR)/textdocs
 HTMLDIR=$(OUTPUTDIR)/htmldocs
@@ -104,6 +105,8 @@ ps: $(PSDIR) $(PSDIR)/Samba-HOWTO-Collection.ps $(PSDIR)/Samba-Developers-Guide.
 
 txt: $(TXTDIR) $(TXTDIR)/Samba-HOWTO-Collection.txt $(TXTDIR)/Samba-Developers-Guide.txt
 
+fo: $(FODIR) $(FODIR)/Samba-HOWTO-Collection.fo $(FODIR)/Samba-Developers-Guide.fo
+
 htmlman: $(HTMLDIR) $(MANPAGES_HTML) $(HTMLDIR)/samba.css
 
 html-single: $(HTMLDIR) $(HTMLDIR)/samba.css $(HTMLDIR)/Samba-HOWTO-Collection.html  $(HTMLDIR)/Samba-Developers-Guide.html $(HTMLDIR)/Samba-Guide.html
@@ -211,6 +214,20 @@ $(PSDIR)/%.ps: $(DVIDIR)/%.dvi
 xslt/figures/%.pdf: xslt/figures/%.eps
        $(EPSTOPDF) $<
 
+# Fo
+$(FODIR):
+       mkdir $(FODIR)
+
+$(FODIR)/%.fo: %.xml $(FODIR)
+       $(XSLTPROC) --output $@ http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl $<
+
+$(HTMLHELPDIR):
+       mkdir $(HTMLHELPDIR)
+
+$(HTMLHELPDIR)/%: %.xml $(HTMLHELPDIR) 
+       -mkdir $@
+       $(XSLTPROC) --stringparam base.dir "$@/" http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl $<
+
 # Single large HTML files
 
 $(HTMLDIR):
@@ -247,25 +264,18 @@ $(PLUCKERDIR)/%.pdb: $(HTMLDIR)/%.html
 
 # Manpages
 $(SMBDOTCONFDOC)/parameters.all.xml: $(SMBDOTCONFDOC)/generate-file-list.sh
-       @cd $(SMBDOTCONFDOC) && \
-       /bin/sh generate-file-list.sh >parameters.all.xml && \
-       cd $(OUTPUTDIR)
+       @cd $(SMBDOTCONFDOC) && /bin/sh generate-file-list.sh >parameters.all.xml
 
 $(SMBDOTCONFDOC)/parameters.global.xml: $(SMBDOTCONFDOC)/parameters.all.xml $(SMBDOTCONFDOC)/generate-context.xsl
-       @cd $(SMBDOTCONFDOC) && \
-       $(XSLTPROC) --xinclude \
-       --param smb.context "'G'" \
+       $(XSLTPROC) --xinclude --param smb.context "'G'" \
        --output parameters.global.xml \
-       generate-context.xsl parameters.all.xml && \
-       cd $(OUTPUTDIR)
+       $(SMBDOTCONFDOC)/generate-context.xsl $(SMBDOTCONFDOC)/parameters.all.xml
 
 $(SMBDOTCONFDOC)/parameters.service.xml: $(SMBDOTCONFDOC)/parameters.all.xml $(SMBDOTCONFDOC)/generate-context.xsl
-       @cd $(SMBDOTCONFDOC) && \
        $(XSLTPROC) --xinclude \
        --param smb.context "'S'" \
        --output parameters.service.xml \
-       generate-context.xsl parameters.all.xml && \
-       cd $(OUTPUTDIR)
+       $(SMBDOTCONFDOC)/generate-context.xsl $(SMBDOTCONFDOC)/parameters.all.xml
 
 smb.conf.5.xml: $(SMBDOTCONFDOC)/smb.conf.5.xml $(SMBDOTCONFDOC)/parameters.all.xml \
                $(SMBDOTCONFDOC)/parameters.global.xml $(SMBDOTCONFDOC)/parameters.service.xml 
diff --git a/README b/README
index 54a6d6ef8f440873a9bdcc0ae948f2de92ad4554..3aa1090388fd612067dd9195b4ecc01b90098667 100644 (file)
--- a/README
+++ b/README
@@ -44,7 +44,7 @@ at http://www.docbook.org/
 
 The Output
 ----------
-The current Samba CVS tree contains the XML/DocBook source files.
+The current Samba Subversion tree contains the XML/DocBook source files.
 
 A regularly generated version can be found at http://samba.org/samba/docs/.
 
@@ -63,13 +63,14 @@ For generating PDF (thru LaTeX):
    dated 20030622 -- it works best. Versions previous to 20030425 are known
    to have problems, as well as current (as of 20031210) snapshots.
  * pdflatex
+ * thumbpdf
 
 For generating PostScript (thru LaTeX):
  * latex
  * dvips 
 
 For generating ASCII:
- * xmlto 
+ * html2text
 
 This directory now contains a ./configure script and Makefile to 
 support the automated building of man pages (including HTML versions), and 
@@ -78,3 +79,21 @@ Samba Developers Guide (HTML,DVI,TeX,PDF,PS,Text versions).
 
 The configure script detects which of the required utilities are installed 
 and builds as much docs as it can using these tools.
+
+Help! Building the docs generates a lot of HTTP traffic...
+-------------
+To be able to build the docs without an internet connection (or faster with 
+a slow internet connection), you need to set up "catalogs".
+
+A catalog contains a list of mappings to locally cached documents. E.g. :
+http://db2latex.sf.net/xsl/ -> /usr/share/sgml/docbook/db2latex/xsl/
+
+Add the following two lines to /etc/xml/catalog for db2latex:
+<rewriteURI uriStartString="http://db2latex.sourceforge.net/xsl/" rewritePrefix="/export/user/me/source/docbook/db2latex/xsl/"/>
+<rewriteURI uriStartString="http://docbook.sourceforge.net/release/xsl/current/" rewritePrefix="/export/user/me/source/docbook/docbook-xsl/"/>
+
+(of course, adapt /export/user/me/source/ to whatever path db2latex is 
+ installed in...)
+
+catalog entries for the other DTD's and XSL scripts should be present on your 
+system already.