2001-02-23 22:34:01 +03:00
#################################################################
# Makefile.in for Samba Documentation
# Authors: James Moore <jmoore@php.net>
2002-09-25 19:10:57 +04:00
# Gerald Carter <jerry@samba.org>
# Jelmer Vernooij <jelmer@samba.org>
2001-02-23 22:34:01 +03:00
#
# Please see http://www.samba.org/samba/cvs.html
# for information on getting the latest
2001-04-24 23:09:42 +04:00
# source and documentation source files.
2001-02-23 22:34:01 +03:00
#
# Autoconf Variables
2002-09-25 19:10:57 +04:00
MANPAGES_NAMES = findsmb.1 smbclient.1 \
smbspool.8 lmhosts.5 \
2002-11-22 03:32:24 +03:00
smbcontrol.1 smbstatus.1 \
smbd.8 net.8 smbtar.1 nmbd.8 \
smbmnt.8 smbumount.8 nmblookup.1 \
smbmount.8 swat.8 rpcclient.1 \
2002-09-25 19:10:57 +04:00
smbpasswd.5 testparm.1 samba.7 \
smbpasswd.8 testprns.1 \
smb.conf.5 wbinfo.1 pdbedit.8 \
smbcacls.1 smbsh.1 winbindd.8 \
2003-04-26 23:29:27 +04:00
tdbbackup.8 vfstest.1 \
profiles.1 smbtree.1 ntlm_auth.1 \
editreg.1 smbcquotas.1
2002-09-25 19:10:57 +04:00
## This part contains only rules. You shouldn't need to change it
## if you are adding docs
2003-05-01 18:16:10 +04:00
XSLTPROC = @XSLTPROC@
PDFLATEX = @PDFLATEX@
2003-05-27 05:28:23 +04:00
LATEX = @LATEX@
DVIPS = @DVIPS@
2002-09-25 19:10:57 +04:00
HTMLDOC = @HTMLDOC@
2003-06-06 02:54:56 +04:00
PNGTOPNM = @PNGTOPNM@
PNMTOPS = @PNMTOPS@
XMLTO = @XMLTO@
2001-02-23 22:34:01 +03:00
SRCDIR = @srcdir@
2001-02-26 16:30:14 +03:00
MANDIR = ../manpages
HTMLDIR = ../htmldocs
2003-05-01 18:16:10 +04:00
MANPROJDOC = manpages
PROJDOC = projdoc
2003-06-06 02:54:56 +04:00
IMAGEPROJDIR = $( PROJDOC) /imagefiles
2003-05-01 18:16:10 +04:00
DEVDOC = devdoc
SMBDOTCONFDOC = smbdotconf
2002-10-25 19:15:32 +04:00
PSDIR = ..
PDFDIR = ..
2003-05-27 05:28:23 +04:00
DVIDIR = ..
2002-10-25 19:15:32 +04:00
TXTDIR = ../textdocs
2003-05-01 18:16:10 +04:00
FAQPROJDOC = faq
2002-10-25 19:15:32 +04:00
FAQDIR = ../faq
2001-02-23 22:34:01 +03:00
2002-09-25 19:10:57 +04:00
MANPAGES = $( patsubst %,$( MANDIR) /%,$( MANPAGES_NAMES) )
MANPAGES_HTML = $( patsubst %,$( HTMLDIR) /%.html,$( MANPAGES_NAMES) )
2001-02-28 21:35:51 +03:00
2003-06-06 02:54:56 +04:00
PROJDOC_IMAGES_PNG = $( wildcard $( IMAGEPROJDIR) /*.png)
PROJDOC_IMAGES_EPS = $( patsubst %.png,%.eps,$( wildcard $( IMAGEPROJDIR) /*.png) )
2003-06-04 02:21:21 +04:00
PROJDOC_DEPS = $( PROJDOC) /*.xml $( PROJDOC) /attributions.xml
2003-06-05 02:35:48 +04:00
DEVDOC_DEPS = $( DEVDOC) /*.xml $( DEVDOC) /attributions.xml
2003-06-04 02:21:21 +04:00
2002-01-05 06:52:39 +03:00
all :
2002-09-25 19:10:57 +04:00
@echo "Supported make targets:"
@echo "manpages - Build manpages"
2003-05-07 01:54:10 +04:00
@echo "pdf - Build PDF version of HOWTO Collection and Developers Guide"
2003-05-27 05:28:23 +04:00
@echo "tex - Build Latex version of HOWTO Collection and Developers Guide"
@echo "dvi - Build Device Independant Files of HOWTO Collection and Developers Guide"
@echo "ps - Build PostScript version of HOWTO Collection and Developers Guide"
2003-05-07 01:54:10 +04:00
@echo "txt - Build plain text version of HOWTO Collection and Developers Guide"
2002-09-25 19:10:57 +04:00
@echo -n "html-single - Build single file HTML version of HOWTO Collection"
@echo " and developers guide"
2003-05-07 01:54:10 +04:00
@echo "html - Build HTML version of HOWTO Collection and Developers Guide"
2002-09-25 19:10:57 +04:00
@echo "htmlman - Build html version of manpages"
2002-10-25 19:15:32 +04:00
@echo "htmlfaq - Build html version of the FAQ"
@echo "everything - Build all of the above"
2003-05-27 05:28:23 +04:00
everything : manpages pdf html -single html htmlman htmlfaq txt ps
2002-10-25 19:15:32 +04:00
# Global rules
2002-09-25 19:10:57 +04:00
2003-04-26 23:29:27 +04:00
manpages : $( MANDIR ) $( MANPAGES )
2003-05-27 05:28:23 +04:00
tex : samba -doc .tex dev -doc .tex
2003-05-01 18:16:10 +04:00
pdf : $( PDFDIR ) $( PDFDIR ) /Samba -HOWTO -Collection .pdf $( PDFDIR ) /Samba -Developers -Guide .pdf
2003-05-27 05:28:23 +04:00
dvi : $( DVIDIR ) $( DVIDIR ) /Samba -HOWTO -Collection .dvi $( DVIDIR ) /Samba -Developers -Guide .dvi
ps : $( PSDIR ) $( PSDIR ) /Samba -HOWTO -Collection .ps $( PSDIR ) /Samba -Developers -Guide .ps
2003-05-26 21:03:54 +04:00
hpdf : $( PDFDIR ) $( PDFDIR ) /Samba -HOWTO -Collection .pdf
2003-05-07 01:54:10 +04:00
txt : $( TXTDIR ) $( TXTDIR ) /Samba -HOWTO -Collection .txt $( TXTDIR ) /Samba -Developers -Guide .txt
2003-05-01 18:16:10 +04:00
htmlman : $( HTMLDIR ) $( MANPAGES_HTML ) CSS
htmlfaq : $( HTMLDIR ) CSS
@$( XSLTPROC) --stringparam base.dir " $( FAQDIR) / " --stringparam root.filename samba-faq xslt/html-chunk.xsl $( FAQPROJDOC) /sambafaq.xml
html-single : $( HTMLDIR ) CSS $( HTMLDIR ) /Samba -HOWTO -Collection .html $( HTMLDIR ) /Samba -Developers -Guide .html
2003-06-04 02:21:21 +04:00
html : $( HTMLDIR ) CSS $( PROJDOC_DEPS )
2003-05-01 18:16:10 +04:00
@$( XSLTPROC) xslt/html-chunk.xsl $( PROJDOC) /samba-doc.xml
2002-10-25 19:15:32 +04:00
# Text files
2003-05-07 01:54:10 +04:00
$(TXTDIR) :
mkdir $( TXTDIR)
2003-06-04 02:21:21 +04:00
$(TXTDIR)/Samba-HOWTO-Collection.txt : $( PROJDOC ) /samba -doc .xml $( PROJDOC_DEPS )
2003-05-07 01:54:10 +04:00
@echo "Converting samba-doc to plain text..."
@$( XMLTO) txt -o $( TXTDIR) $<
@mv $( TXTDIR) /samba-doc.txt $( TXTDIR) /Samba-HOWTO-Collection.txt
2003-06-04 02:21:21 +04:00
$(TXTDIR)/Samba-Developers-Guide.txt : $( DEVDOC ) /dev -doc .xml $( DEVDOC_DEPS )
2003-05-07 01:54:10 +04:00
@echo "Converting dev-doc to plain text..."
@$( XMLTO) txt -o $( TXTDIR) $<
@mv $( TXTDIR) /dev-doc.txt $( TXTDIR) /Samba-Developers-Guide.txt
2002-09-25 19:10:57 +04:00
2003-05-27 05:28:23 +04:00
# Tex files
2003-06-04 02:21:21 +04:00
samba-doc.tex : $( PROJDOC ) /samba -doc .xml $( PROJDOC_DEPS )
2003-05-01 18:16:10 +04:00
@echo "Converting samba-doc to LaTeX..."
2003-05-27 05:28:23 +04:00
@$( XSLTPROC) --output $@ xslt/latex.xsl $<
2003-06-04 02:21:21 +04:00
dev-doc.tex : $( DEVDOC ) /dev -doc .xml $( DEVDOC_DEPS )
2003-05-27 05:28:23 +04:00
@echo "Converting dev-doc to LaTeX..."
@$( XSLTPROC) --output $@ xslt/latex.xsl $<
# Adobe PDF files
2003-06-06 02:54:56 +04:00
$(PDFDIR)/Samba-HOWTO-Collection.pdf : samba -doc .tex $( PROJDOC_IMAGES_PNG )
2003-05-01 18:16:10 +04:00
@echo " Building LaTeX sources via $( PDFLATEX) ... "
2003-05-27 05:28:23 +04:00
@$( PDFLATEX) $< | grep 'Rerun to get cross-references right' && \
$( PDFLATEX) $< | grep 'Rerun to get cross-references right' && \
$( PDFLATEX) $< || echo
2003-05-01 18:16:10 +04:00
@echo "done"
@mv samba-doc.pdf $@
2003-05-27 05:28:23 +04:00
$(PDFDIR)/Samba-Developers-Guide.pdf : dev -doc .tex
2003-05-01 18:16:10 +04:00
@echo " Building LaTeX sources via $( PDFLATEX) ... "
2003-05-27 05:28:23 +04:00
@$( PDFLATEX) $< | grep 'Rerun to get cross-references right' && \
$( PDFLATEX) $< | grep 'Rerun to get cross-references right' && \
$( PDFLATEX) $< || echo
2003-05-01 18:16:10 +04:00
@echo "done"
@mv dev-doc.pdf $@
2002-09-25 19:10:57 +04:00
2003-06-06 02:54:56 +04:00
epsimages : $( PROJDOC_IMAGES_EPS )
2003-05-27 05:28:23 +04:00
# DVI files
2003-06-06 02:54:56 +04:00
$(DVIDIR)/Samba-HOWTO-Collection.dvi : samba -doc .tex $( PROJDOC_IMAGES_EPS )
2003-05-27 05:28:23 +04:00
@echo " Building LaTeX sources via $( LATEX) ... "
2003-05-27 17:20:26 +04:00
@$( LATEX) $< 2>& 1 | grep 'Rerun to get cross-references right' && \
$( LATEX) $< 2>& 1 | grep 'Rerun to get cross-references right' && \
$( LATEX) $< 2>& 1 || echo
2003-05-27 05:28:23 +04:00
@echo "done"
@mv samba-doc.dvi $@
$(DVIDIR)/Samba-Developers-Guide.dvi : dev -doc .tex
@echo " Building LaTeX sources via $( LATEX) ... "
2003-05-27 17:20:26 +04:00
@$( LATEX) $< 2>& 1 | grep 'Rerun to get cross-references right' && \
$( LATEX) $< 2>& 1 | grep 'Rerun to get cross-references right' && \
$( LATEX) $< 2>& 1 || echo
2003-05-27 05:28:23 +04:00
@echo "done"
@mv dev-doc.dvi $@
2003-06-06 02:54:56 +04:00
$(IMAGEPROJDIR)/%.eps : $( IMAGEPROJDIR ) /%.png
@$( PNGTOPNM) $< | $( PNMTOPS) > $@
2003-05-27 05:28:23 +04:00
# PostScript files
$(PSDIR)/Samba-HOWTO-Collection.ps : $( DVIDIR ) /Samba -HOWTO -Collection .dvi
$( DVIPS) -o $@ $<
$(PSDIR)/Samba-Developers-Guide.ps : $( DVIDIR ) /Samba -Developers -Guide .dvi
$( DVIPS) -o $@ $<
2002-10-25 19:15:32 +04:00
# Single large HTML files
2003-04-26 23:29:27 +04:00
$(HTMLDIR) :
2003-05-01 18:16:10 +04:00
@mkdir $( HTMLDIR)
2003-04-26 23:29:27 +04:00
2003-05-01 18:16:10 +04:00
CSS : $( HTMLDIR ) xslt /html /samba .css
@cp xslt/html/samba.css $( HTMLDIR) /
2002-09-25 19:10:57 +04:00
2003-06-06 02:54:56 +04:00
$(HTMLDIR)/Samba-HOWTO-Collection.html : $( PROJDOC ) /samba -doc .xml $( PROJDOC_DEPS ) $( PROJDOC_IMAGES_PNG )
2003-05-01 18:16:10 +04:00
@$( XSLTPROC) --output $@ xslt/html.xsl $<
2002-09-25 19:10:57 +04:00
2003-06-04 02:21:21 +04:00
$(HTMLDIR)/Samba-Developers-Guide.html : $( DEVDOC ) /dev -doc .xml $( DEVDOC_DEPS )
2003-05-01 18:16:10 +04:00
@$( XSLTPROC) --output $@ xslt/html.xsl $<
2002-09-25 19:10:57 +04:00
2003-05-01 18:16:10 +04:00
$(HTMLDIR)/%.html : $( MANPROJDOC ) /%.xml
@$( XSLTPROC) --output $@ xslt/html.xsl $<
2003-04-26 23:29:27 +04:00
# Manpages
2003-05-01 18:16:10 +04:00
$(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) && \
2003-06-05 20:56:06 +04:00
$( XSLTPROC) --xinclude \
2003-05-01 18:16:10 +04:00
--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) && \
2003-06-05 20:56:06 +04:00
$( XSLTPROC) --xinclude \
2003-05-01 18:16:10 +04:00
--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
2003-04-26 23:29:27 +04:00
2003-06-04 02:21:21 +04:00
$(PROJDOC)/attributions.xml : $( PROJDOC ) /samba -doc .xml
@echo > $@ # Make sure we don't get recursive dependencies, etc!
@echo "Generating attributions page"
2003-06-05 04:24:56 +04:00
@$( XSLTPROC) --output $@ xslt/generate-attributions.xsl $<
2003-06-05 02:35:48 +04:00
$(DEVDOC)/attributions.xml : $( DEVDOC ) /dev -doc .xml
@echo > $@ # Make sure we don't get recursive dependencies, etc!
@echo "Generating attributions page"
2003-06-05 04:24:56 +04:00
@$( XSLTPROC) --output $@ xslt/generate-attributions.xsl $<
2003-06-04 02:21:21 +04:00
2003-04-26 23:29:27 +04:00
$(MANDIR) :
mkdir $( MANDIR)
2002-09-25 19:10:57 +04:00
2003-05-01 18:16:10 +04:00
$(MANDIR)/% : $( MANPROJDOC ) /%.xml
@$( XSLTPROC) xslt/man.xsl $<
2002-01-05 06:52:39 +03:00
2001-02-23 22:34:01 +03:00
clean :
2003-05-01 18:16:10 +04:00
@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
2003-06-04 02:21:21 +04:00
@rm -f samba-doc.* dev-doc.* $( PROJDOC) /attributions.xml
2003-06-06 02:54:56 +04:00
@rm -f $( IMAGEPROJDIR) /*.eps
2003-05-01 18:16:10 +04:00