summaryrefslogtreecommitdiff
path: root/docs/docbook/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'docs/docbook/Makefile.in')
-rw-r--r--docs/docbook/Makefile.in142
1 files changed, 75 insertions, 67 deletions
diff --git a/docs/docbook/Makefile.in b/docs/docbook/Makefile.in
index d55d2daaec..eba98e6c66 100644
--- a/docs/docbook/Makefile.in
+++ b/docs/docbook/Makefile.in
@@ -28,24 +28,20 @@ MANPAGES_NAMES=findsmb.1 smbclient.1 \
## This part contains only rules. You shouldn't need to change it
## if you are adding docs
-DOCBOOK2MAN = @JW@ -b man
-DOCBOOK2HTML = @JW@ -b html
-DOCBOOK2PDF = @JW@ -b pdf
-DOCBOOK2PS = @JW@ -b ps
-DOCBOOK2TXT = @JW@ -b txt
-DOCBOOK2INFO = @JW@ -b texi
+XSLTPROC = @XSLTPROC@
+PDFLATEX = @PDFLATEX@
HTMLDOC = @HTMLDOC@
SRCDIR = @srcdir@
MANDIR=../manpages
HTMLDIR=../htmldocs
-MANPROJDOC = manpages/
-PROJDOC = projdoc/
-DEVDOC = devdoc/
-PERL = @PERL@
+MANPROJDOC = manpages
+PROJDOC = projdoc
+DEVDOC = devdoc
+SMBDOTCONFDOC = smbdotconf
PSDIR = ..
PDFDIR = ..
TXTDIR = ../textdocs
-FAQPROJDOC = faq/
+FAQPROJDOC = faq
FAQDIR = ../faq
MANPAGES=$(patsubst %,$(MANDIR)/%,$(MANPAGES_NAMES))
@@ -54,91 +50,103 @@ MANPAGES_HTML=$(patsubst %,$(HTMLDIR)/%.html,$(MANPAGES_NAMES))
all:
@echo "Supported make targets:"
@echo "manpages - Build manpages"
- @echo "ps - Build PostScript version of HOWTO Collection"
@echo "pdf - Build PDF version of HOWTO Collection"
@echo -n "html-single - Build single file HTML version of HOWTO Collection"
@echo " and developers guide"
@echo "html - Build HTML version of HOWTO Collection"
@echo "htmlman - Build html version of manpages"
- @echo "txt - Build plain text version of HOWTO Collection"
@echo "htmlfaq - Build html version of the FAQ"
@echo "everything - Build all of the above"
-everything: manpages ps pdf html-single html htmlman txt htmlfaq
+everything: manpages pdf html-single html htmlman htmlfaq
# Global rules
manpages: $(MANDIR) $(MANPAGES)
-pdf: $(PDFDIR) $(PDFDIR)/Samba-HOWTO-Collection.pdf ../Samba-Developers-Guide.pdf
-ps: $(PSDIR) $(PSDIR)/Samba-HOWTO-Collection.ps ../Samba-Developers-Guide.ps
-txt: $(TXTDIR) $(TXTDIR)/Samba-HOWTO-Collection.txt $(TXTDIR)/Samba-Developers-Guide.txt
-htmlman: $(HTMLDIR) $(MANPAGES_HTML)
-htmlfaq: $(HTMLDIR)
- $(DOCBOOK2HTML) -d samba.dsl -o $(FAQDIR) $(FAQPROJDOC)/sambafaq.sgml
-html-single: $(HTMLDIR) $(HTMLDIR)/Samba-HOWTO-Collection.html $(HTMLDIR)/Samba-Developers-Guide.html
-html: $(HTMLDIR)
- $(DOCBOOK2HTML) -d samba.dsl -o $(HTMLDIR) $(PROJDOC)/samba-doc.sgml
+pdf: $(PDFDIR) $(PDFDIR)/Samba-HOWTO-Collection.pdf $(PDFDIR)/Samba-Developers-Guide.pdf
+htmlman: $(HTMLDIR) $(MANPAGES_HTML) CSS
+htmlfaq: $(HTMLDIR) CSS
+ @$(XSLTPROC) --output $(FAQDIR)/samba-faq.html xslt/html.xsl $(FAQPROJDOC)/sambafaq.xml
+html-single: $(HTMLDIR) CSS $(HTMLDIR)/Samba-HOWTO-Collection.html $(HTMLDIR)/Samba-Developers-Guide.html
+html: $(HTMLDIR) CSS
+ @$(XSLTPROC) xslt/html-chunk.xsl $(PROJDOC)/samba-doc.xml
# Text files
-$(TXTDIR):
- mkdir $(TXTDIR)
-
-$(TXTDIR)/Samba-HOWTO-Collection.txt: $(PROJDOC)/samba-doc.sgml
- $(DOCBOOK2TXT) -d samba.dsl -o . $<
- mv ./samba-doc.txt $@
-
-$(TXTDIR)/Samba-Developers-Guide.txt: $(DEVDOC)/dev-doc.sgml
- $(DOCBOOK2TXT) -d samba.dsl -o . $<
- mv ./dev-doc.txt $@
-
-# PostScript
-
-$(PSDIR):
- mkdir $(PSDIR)
-
-$(PSDIR)/Samba-HOWTO-Collection.ps: $(PROJDOC)/samba-doc.sgml
- $(DOCBOOK2PS) -d samba.dsl -o . $<
- mv ./samba-doc.ps $@
-
-$(PSDIR)/Samba-Developers-Guide.ps: $(DEVDOC)/dev-doc.sgml
- $(DOCBOOK2PS) -d samba.dsl -o . $<
- mv ./dev-doc.ps $@
-
# Adobe PDF files
-
-$(PDFDIR)/Samba-HOWTO-Collection.pdf: $(HTMLDIR)/Samba-HOWTO-Collection.html
- $(HTMLDOC) --book --color --links -f $@ $<
-
-$(PDFDIR)/Samba-Developers-Guide.pdf: $(HTMLDIR)/Samba-Developers-Guide.html
- $(HTMLDOC) --book --color --links -f $@ $<
+$(PDFDIR)/Samba-HOWTO-Collection.pdf: $(PROJDOC)/samba-doc.xml
+ @echo "Converting samba-doc to LaTeX..."
+ @$(XSLTPROC) --output samba-doc.tex xslt/latex.xsl $<
+ @echo "Building LaTeX sources via $(PDFLATEX)..."
+ @$(PDFLATEX) samba-doc.tex | grep 'Rerun to get cross-references right' && \
+ $(PDFLATEX) samba-doc.tex | grep 'Rerun to get cross-references right' && \
+ $(PDFLATEX) samba-doc.tex || echo
+ @echo "done"
+ @mv samba-doc.pdf $@
+
+$(PDFDIR)/Samba-Developers-Guide.pdf: $(DEVDOC)/dev-doc.xml
+ @echo "Converting dev-doc to LaTeX..."
+ @$(XSLTPROC) --output dev-doc.tex xslt/latex.xsl $<
+ @echo "Building LaTeX sources via $(PDFLATEX)..."
+ @$(PDFLATEX) dev-doc.tex | grep 'Rerun to get cross-references right' && \
+ $(PDFLATEX) dev-doc.tex | grep 'Rerun to get cross-references right' && \
+ $(PDFLATEX) dev-doc.tex || echo
+ @echo "done"
+ @mv dev-doc.pdf $@
# Single large HTML files
$(HTMLDIR):
- mkdir $(HTMLDIR)
+ @mkdir $(HTMLDIR)
-$(HTMLDIR)/Samba-HOWTO-Collection.html: $(PROJDOC)/samba-doc.sgml
- $(DOCBOOK2HTML) -d samba.dsl -u -o . $<
- mv ./samba-doc.html $@
+CSS: $(HTMLDIR) xslt/html/samba.css
+ @cp xslt/html/samba.css $(HTMLDIR)/
-$(HTMLDIR)/Samba-Developers-Guide.html: $(DEVDOC)/dev-doc.sgml
- $(DOCBOOK2HTML) -d samba.dsl -u -o . $<
- mv ./dev-doc.html $@
+$(HTMLDIR)/Samba-HOWTO-Collection.html: $(PROJDOC)/samba-doc.xml
+ @$(XSLTPROC) --output $@ xslt/html.xsl $<
+$(HTMLDIR)/Samba-Developers-Guide.html: $(DEVDOC)/dev-doc.xml
+ @$(XSLTPROC) --output $@ xslt/html.xsl $<
-$(HTMLDIR)/%.html: $(MANPROJDOC)/%.sgml
- $(DOCBOOK2HTML) -d samba.dsl -u -o $(HTMLDIR) $<
+
+$(HTMLDIR)/%.html: $(MANPROJDOC)/%.xml
+ @$(XSLTPROC) --output $@ xslt/html.xsl $<
# Manpages
+$(SMBDOTCONFDOC)/parameters.all.xml: $(SMBDOTCONFDOC)/generate-file-list.sh
+ @cd $(SMBDOTCONFDOC) && \
+ /bin/sh generate-file-list.sh >parameters.all.xml && \
+ cd ..
+
+$(SMBDOTCONFDOC)/parameters.global.xml: $(SMBDOTCONFDOC)/parameters.all.xml $(SMBDOTCONFDOC)/generate-context.xsl
+ @cd $(SMBDOTCONFDOC) && \
+ $(XSLTPROC) --xinclude \
+ --param smb.context "'G'" \
+ --output parameters.global.xml \
+ generate-context.xsl parameters.all.xml && \
+ cd ..
+
+$(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 ..
+
+$(MANPROJDOC)/smb.conf.5.xml: $(SMBDOTCONFDOC)/smb.conf.5.xml $(SMBDOTCONFDOC)/parameters.all.xml \
+ $(SMBDOTCONFDOC)/parameters.global.xml $(SMBDOTCONFDOC)/parameters.service.xml \
+ $(SMBDOTCONFDOC)/expand-smb.conf.xsl
+ @$(XSLTPROC) --xinclude --output $(MANPROJDOC)/smb.conf.5.xml $(SMBDOTCONFDOC)/expand-smb.conf.xsl $(SMBDOTCONFDOC)/smb.conf.5.xml
$(MANDIR):
mkdir $(MANDIR)
-$(MANDIR)/%: $(MANPROJDOC)/%.sgml
- $(DOCBOOK2MAN) -d samba.dsl -o $(MANDIR) $<
- $(PERL) scripts/strip-links.pl < $@ > $@.temp
- mv $@.temp $@
+$(MANDIR)/%: $(MANPROJDOC)/%.xml
+ @$(XSLTPROC) xslt/man.xsl $<
clean:
- rm -f $(MANPAGES) $(MANPAGES_HTML) $(HTMLDIR)/*.html $(TXTDIR)/*.txt $(PSDIR)/*.ps $(PDFDIR)/*.pdf
+ @rm -f $(MANPAGES) $(MANPAGES_HTML) $(HTMLDIR)/*.html $(HTMLDIR)/*.css $(TXTDIR)/*.txt $(PSDIR)/*.ps $(PDFDIR)/*.pdf
+ @rm -f $(MANPROJDOC)/smb.conf.5.xml $(SMBDOTCONFDOC)/parameters.*.xml
+ @rm -f samba-doc.* dev-doc.*
+