Add log2pcap
[bbaumbach/samba-autobuild/.git] / docs / docbook / Makefile.in
1 #################################################################
2 # Makefile.in for Samba Documentation
3 # Authors:      James Moore <jmoore@php.net>
4 #               Gerald Carter <jerry@samba.org>
5 #               Jelmer Vernooij <jelmer@samba.org>
6 #
7 # Please see http://www.samba.org/samba/cvs.html
8 # for information on getting the latest  
9 # source and documentation source files.  
10 #
11 #
12 MANPAGES_NAMES=findsmb.1 smbclient.1 \
13         smbspool.8 lmhosts.5 \
14         smbcontrol.1 smbstatus.1 \
15         smbd.8 net.8 smbtar.1 nmbd.8 \
16         smbmnt.8 smbumount.8 nmblookup.1 \
17         smbmount.8 swat.8 rpcclient.1 \
18         smbpasswd.5 testparm.1 samba.7 \
19         smbpasswd.8 testprns.1 \
20         smb.conf.5 wbinfo.1 pdbedit.8 \
21         smbcacls.1 smbsh.1 winbindd.8 \
22         tdbbackup.8 vfstest.1 \
23         profiles.1 smbtree.1 ntlm_auth.1 \
24         editreg.1 smbcquotas.1 log2pcap.1
25
26 ## This part contains only rules. You shouldn't need to change it 
27 ## if you are adding docs
28
29 TEXSTYLESHEET = @TEXSTYLESHEET@
30 XSLTPROC = @XSLTPROC@ @PAPERSIZE@ --stringparam samba-book 1 --stringparam duplicate_ulinks "@DUPLICATE_ULINKS@" @FONTSIZE@ @CROP@
31 DVIPS = @DVIPS@
32 PNGTOPNM = @PNGTOPNM@
33 PNMTOPS = @PNMTOPS@
34 XMLTO = @XMLTO@
35 SRCDIR = @srcdir@
36 MANDIR=../manpages
37 MANPROJDOC = manpages
38 PROJDOC = projdoc
39 MAKEINDEX = @MAKEINDEX@
40 IMAGEPROJDIR = $(PROJDOC)/imagefiles
41 DEVDOC = devdoc
42 SMBDOTCONFDOC = smbdotconf
43 PSDIR = ..
44 PDFDIR = ..
45 DVIDIR = ..
46 TXTDIR = ../textdocs
47 FAQPROJDOC = faq
48 FAQDIR = ../faq
49 HTMLDIR=../htmldocs
50 PDFLATEX = TEXINPUTS=xslt/latex:.: @PDFLATEX@ --interaction nonstopmode
51 LATEX = TEXINPUTS=xslt/latex:.: @LATEX@ --interaction nonstopmode
52
53 MANPAGES=$(patsubst %,$(MANDIR)/%,$(MANPAGES_NAMES))
54 MANPAGES_HTML=$(patsubst %,$(HTMLDIR)/%.html,$(MANPAGES_NAMES))
55
56 PROJDOC_IMAGES_PNG = $(wildcard $(IMAGEPROJDIR)/*.png)
57 PROJDOC_IMAGES_EPS=$(patsubst %.png,%.eps,$(wildcard $(IMAGEPROJDIR)/*.png))
58 PROJDOC_DEPS = $(PROJDOC)/*.xml $(PROJDOC)/attributions.xml $(MANPROJDOC)/*.xml $(SMBDOTCONFDOC)/smb.conf.5.xml $(SMBDOTCONFDOC)/parameters.all.xml $(SMBDOTCONFDOC)/parameters.global.xml $(SMBDOTCONFDOC)/parameters.service.xml 
59 DEVDOC_DEPS = $(DEVDOC)/*.xml $(DEVDOC)/attributions.xml
60
61 all: 
62         @echo "Supported make targets:"
63         @echo "pdf - Build PDF version of book"
64         @echo "tex - Build Latex version of book"
65         @echo "dvi - Build Device Independant File of book"
66         @echo "ps - Build PostScript version of book"
67         @echo "everything - Build all of the above"
68         @echo "manpages - Build manpages"
69         @echo "txt - Build plain text version of HOWTO Collection and Developers Guide"
70         @echo -n "html-single - Build single file HTML version of HOWTO Collection"
71         @echo " and developers guide"
72         @echo "html - Build HTML version of HOWTO Collection and Developers Guide"
73         @echo "htmlman - Build html version of manpages"
74         @echo "htmlfaq - Build html version of the FAQ"
75         @echo "undocumented - Output list of undocumented smb.conf options"
76         @echo "everything - Build all of the above"
77
78 everything: manpages pdf html-single html htmlman htmlfaq txt ps
79
80 # Global rules
81
82 pdf: $(PDFDIR) $(PDFDIR)/Samba-HOWTO-Collection.pdf $(PDFDIR)/Samba-Developers-Guide.pdf
83 dvi: $(DVIDIR) $(DVIDIR)/Samba-HOWTO-Collection.dvi $(DVIDIR)/Samba-Developers-Guide.dvi
84 ps: $(PSDIR) $(PSDIR)/Samba-HOWTO-Collection.ps $(PSDIR)/Samba-Developers-Guide.ps
85 txt: $(TXTDIR) $(TXTDIR)/Samba-HOWTO-Collection.txt $(TXTDIR)/Samba-Developers-Guide.txt
86 htmlman: $(HTMLDIR) $(MANPAGES_HTML) CSS
87 htmlfaq: $(HTMLDIR) CSS
88         $(XSLTPROC) --stringparam base.dir "$(FAQDIR)/" --stringparam root.filename samba-faq xslt/html-chunk.xsl $(FAQPROJDOC)/sambafaq.xml
89 html-single: $(HTMLDIR) CSS $(HTMLDIR)/Samba-HOWTO-Collection.html  $(HTMLDIR)/Samba-Developers-Guide.html
90 html: $(HTMLDIR) CSS Samba-HOWTO-Collection.xml
91         $(XSLTPROC) -o $(HTMLDIR) xslt/html-chunk.xsl Samba-HOWTO-Collection.xml
92 manpages: $(MANDIR) $(MANPAGES)
93 tex: Samba-HOWTO-Collection.tex Samba-Developers-Guide.tex
94
95 Samba-HOWTO-Collection.xml: $(PROJDOC)/samba-doc.xml $(PROJDOC_DEPS)
96         $(XSLTPROC) --xinclude --output $@ xslt/expand-sambadoc.xsl $<
97
98 Samba-Developers-Guide.xml: $(DEVDOC)/dev-doc.xml $(DEVDOC_DEPS)
99         $(XSLTPROC) --xinclude --output $@ xslt/expand-sambadoc.xsl $<
100
101 $(PROJDOC)/attributions.xml: $(PROJDOC)/samba-doc.xml
102         @echo > $@ # Make sure we don't get recursive dependencies, etc!
103         $(XSLTPROC) --output $@ xslt/generate-attributions.xsl $<
104
105 $(DEVDOC)/attributions.xml: $(DEVDOC)/dev-doc.xml
106         @echo > $@ # Make sure we don't get recursive dependencies, etc!
107         $(XSLTPROC) --output $@ xslt/generate-attributions.xsl $<
108
109 clean: 
110         @rm -f *.xml $(MANPAGES) $(TXTDIR)/*.txt $(PSDIR)/*.ps $(PDFDIR)/*.pdf 
111         @rm -f $(SMBDOTCONFDOC)/parameters.*.xml $(DVIDIR)/*.dvi
112         @rm -f samba-doc.* dev-doc.* $(PROJDOC)/attributions.xml $(DEVDOC)/attributions.xml
113         @rm -f $(IMAGEPROJDIR)/*.eps $(MANPROJDOC)/smb.conf.5.xml
114
115 # Text files
116 $(TXTDIR):
117         mkdir $(TXTDIR)
118
119 $(TXTDIR)/%.txt: %.xml
120         $(XMLTO) txt -o $(TXTDIR) $< > $@
121
122 # Tex files
123 %.tex: %.xml
124         $(XSLTPROC) --output $@ xslt/latex.xsl $<
125         
126 # Adobe PDF files
127 $(PDFDIR)/%.pdf: %.tex
128         $(PDFLATEX) $<
129         $(PDFLATEX) $<
130         $(PDFLATEX) $<
131         mv $(patsubst %.tex,%.pdf,$<) $@
132
133 epsimages: $(PROJDOC_IMAGES_EPS)
134
135 # DVI files
136 $(DVIDIR)/%.dvi: %.tex epsimages
137         $(LATEX) $<
138         $(LATEX) $< 
139         $(LATEX) $< 
140         mv $(patsubst %.tex,%.dvi,$<) $@
141
142 %.eps: %.png
143         $(PNGTOPNM) $< | $(PNMTOPS) > $@
144
145 # PostScript files
146 $(PSDIR)/%.ps: $(DVIDIR)/%.dvi
147         $(DVIPS) -o $@ $<
148
149 # Single large HTML files
150
151 $(HTMLDIR):
152         mkdir $(HTMLDIR)
153
154 CSS: $(HTMLDIR) xslt/html/samba.css
155         cp xslt/html/samba.css $(HTMLDIR)/
156
157 $(HTMLDIR)/Samba-HOWTO-Collection.html: Samba-HOWTO-Collection.xml $(PROJDOC_DEPS) $(PROJDOC_IMAGES_PNG)
158         $(XSLTPROC) --output $@ xslt/html.xsl $<
159
160 $(HTMLDIR)/Samba-Developers-Guide.html: Samba-Developers-Guide.xml $(DEVDOC_DEPS)
161         $(XSLTPROC) --output $@ xslt/html.xsl $<
162
163 $(HTMLDIR)/%.html: %.xml
164         $(XSLTPROC) --output $@ xslt/html.xsl $<
165
166 %.xml: $(MANPROJDOC)/%.xml
167         $(XSLTPROC) --output $@ xslt/expand-sambadoc.xsl $<
168
169 # Manpages
170 $(SMBDOTCONFDOC)/parameters.all.xml: $(SMBDOTCONFDOC)/generate-file-list.sh
171         @cd $(SMBDOTCONFDOC) && \
172         /bin/sh generate-file-list.sh >parameters.all.xml && \
173         cd ..
174
175 $(SMBDOTCONFDOC)/parameters.global.xml: $(SMBDOTCONFDOC)/parameters.all.xml $(SMBDOTCONFDOC)/generate-context.xsl
176         @cd $(SMBDOTCONFDOC) && \
177         $(XSLTPROC) --xinclude \
178         --param smb.context "'G'" \
179         --output parameters.global.xml \
180         generate-context.xsl parameters.all.xml && \
181         cd ..
182
183 $(SMBDOTCONFDOC)/parameters.service.xml: $(SMBDOTCONFDOC)/parameters.all.xml $(SMBDOTCONFDOC)/generate-context.xsl
184         @cd $(SMBDOTCONFDOC) && \
185         $(XSLTPROC) --xinclude \
186         --param smb.context "'S'" \
187         --output parameters.service.xml \
188         generate-context.xsl parameters.all.xml && \
189         cd ..
190
191 smb.conf.5.xml: $(SMBDOTCONFDOC)/smb.conf.5.xml $(SMBDOTCONFDOC)/parameters.all.xml \
192                 $(SMBDOTCONFDOC)/parameters.global.xml $(SMBDOTCONFDOC)/parameters.service.xml 
193         $(XSLTPROC) --xinclude --output $@ xslt/expand-sambadoc.xsl $<
194
195 $(MANDIR): 
196         mkdir $(MANDIR)
197
198 $(MANDIR)/%: %.xml
199         $(XSLTPROC) --output $@ xslt/man.xsl $<
200
201 undocumented: $(SMBDOTCONFDOC)/parameters.all.xml
202         $(PERL) scripts/find_missing_doc.pl ../..