updated Makefile to generate howto's and the FAQ
[samba.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 #
6 # Please see http://www.samba.org/samba/cvs.html
7 # for information on getting the latest  
8 # source and doucmentation source files.  
9 #
10
11 # Autoconf Variables
12 SRCDIR = @srcdir@
13 JADE = @JADE@
14 NSGMLS = @NSGMLS@
15 ONSGMLS=@ONSGMLS@
16 SGMLSPL=@SGMLSPL@
17 HTMLDOC=@HTMLDOC@
18 #CATALOG = @CATALOG@
19 MANDIR=../manpages
20 HTMLDIR=../htmldocs
21
22 #Stylesheets and Dependicies
23 SGML_SHARE=@SGML_SHARE@
24 #SGML_CATALOG_FILES=$(SGML_CATALOG_FILES):./dbsgml/catalog
25 HTML_STYLESHEET = $(srcdir)/stylesheets/html.dsl
26 HTML_DEPS = $(srcdir)/stylesheets/html-common.dsl $(srcdir)/stylesheets/common.dsl
27
28 MANPAGES=$(MANDIR)/findsmb.1 $(MANDIR)/smbclient.1 \
29         $(MANDIR)/smbspool.8 $(MANDIR)/lmhosts.5 \
30         $(MANDIR)/smbcontrol.1  $(MANDIR)/smbstatus.1 \
31         $(MANDIR)/make_smbcodepage.1  $(MANDIR)/smbd.8 \
32         $(MANDIR)/smbtar.1 $(MANDIR)/nmbd.8 $(MANDIR)/smbmnt.8 \
33         $(MANDIR)/smbumount.8 $(MANDIR)/nmblookup.1 \
34         $(MANDIR)/smbmount.8 $(MANDIR)/swat.8 $(MANDIR)/rpcclient.1      \
35         $(MANDIR)/smbpasswd.5 $(MANDIR)/testparm.1 $(MANDIR)/samba.7 \
36         $(MANDIR)/smbpasswd.8 $(MANDIR)/testprns.1 \
37         $(MANDIR)/smb.conf.5 $(MANDIR)/smbrun.1 $(MANDIR)/wbinfo.1 \
38         $(MANDIR)/smbcacls.1 $(MANDIR)/smbsh.1 $(MANDIR)/winbindd.8 
39
40 SGMLMANSRC=manpages/findsmb.1.sgml manpages/smbclient.1.sgml \
41         manpages/smbspool.8.sgml manpages/lmhosts.5.sgml \
42         manpages/smbcontrol.1.sgml manpages/smbstatus.1.sgml \
43         manpages/make_smbcodepage.1.sgml  manpages/smbd.8.sgml \
44         manpages/smbtar.1.sgml manpages/nmbd.8.sgml manpages/smbmnt.8.sgml \
45         manpages/smbumount.8.sgml manpages/nmblookup.1.sgml \
46         manpages/smbmount.8.sgml manpages/swat.8.sgml \
47         manpages/rpcclient.1.sgml manpages/smbpasswd.5.sgml \
48         manpages/testparm.1.sgml manpages/samba.7.sgml \
49         manpages/smbpasswd.8.sgml manpages/testprns.1.sgml \
50         manpages/smb.conf.5.sgml manpages/smbrun.1.sgml \
51         manpages/wbinfo.1.sgml manpages/smbcacls.1.sgml \
52         manpages/smbsh.1.sgml manpages/winbindd.8.sgml
53
54 HOWTOSRC=howto/DOMAIN_MEMBER.sgml howto/NT_Security.sgml howto/samba-pdc-howto.sgml
55 FAQSRC=faq/samba-pdc-faq.sgml
56
57
58
59 ######################################################################
60 # Make instructions
61 ######################################################################
62 all: man
63
64 man: $(MANPAGES)
65
66 FAQ: $(FAQSRC)
67         @echo Building SAMBA PDC FAQ...
68         @(for i in $?; do \
69            htmlfile=`basename $$i | sed "s/\.sgml/\.html/g"`; \
70            echo "Making $$htmlfile"; \
71            $(JADE) -t sgml -V nochunks -d  $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl \
72               -f /tmp/jade.log $$i > ../htmldocs/$$htmlfile; \
73            cat /tmp/jade.log | grep -v DTDDECL; \
74            /bin/rm -f /tmp/jade.log; \
75         done)
76
77 HOWTO: $(HOWTOSRC)
78         @echo Building HOWTO pages...
79         @(for i in $?; do \
80            htmlfile=`basename $$i | sed "s/\.sgml/\.html/g"`; \
81            echo "Making $$htmlfile"; \
82            $(JADE) -t sgml -V nochunks -d  $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl \
83               -f /tmp/jade.log $$i > ../htmldocs/$$htmlfile; \
84            cat /tmp/jade.log | grep -v DTDDECL; \
85            /bin/rm -f /tmp/jade.log; \
86         done)
87
88 proj-doc: 
89         @(cd projdoc; $(JADE) -t sgml -V nochunks -d  $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl samba-doc.sgml > ../samba-doc.html)
90         @$(HTMLDOC) -f samba-doc.pdf samba-doc.html
91
92
93
94 ## generate all HTML man pages
95 man-html-all: $(SGMLMANSRC)
96         @echo Building HTML formatted man pages...
97         @(for i in $?; do \
98            htmlfile=`basename $$i | sed "s/\.sgml/\.html/g"`; \
99            echo "Making $$htmlfile"; \
100            $(JADE) -t sgml -V nochunks -d  $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl \
101               -f /tmp/jade.log $$i > ../htmldocs/$$htmlfile; \
102            cat /tmp/jade.log | grep -v DTDDECL; \
103            /bin/rm -f /tmp/jade.log; \
104         done)
105
106 ## generate all man pages
107 man-all: $(SGMLMANSRC)
108         @echo Building man pages...
109         @(for i in $?; do \
110                 manfile=`basename $$i | sed "s/\.sgml//g"`; \
111                 echo "Making $$manfile"; \
112                 $(ONSGMLS) -f /tmp/docbook2x.log $$i | $(SGMLSPL) \
113                    $(SGML_SHARE)/docbook2X/docbook2man-spec.pl; \
114                 cat /tmp/docbook2x.log | grep -v DTDDECL; \
115                 /bin/rm -f /tmp/docbook2x.log; \
116                 /bin/mv -f $$manfile $(MANDIR)/$$manfile; \
117           done)
118
119
120         
121
122 ##
123 ## these rules are for building individual files
124 ##
125 $(MANDIR)/findsmb.1:  manpages/findsmb.1.sgml
126         @echo "Making $@"
127         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
128         @/bin/mv `basename $@` $(MANDIR)
129         @echo "Making HTML version of $@"
130         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
131         
132 $(MANDIR)/smbclient.1: manpages/smbclient.1.sgml
133         @echo "Making $@"
134         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
135         @/bin/mv `basename $@` $(MANDIR)
136         @echo "Making HTML version of $@"
137         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
138
139 $(MANDIR)/smbspool.8: manpages/smbspool.8.sgml
140         @echo "Making $@"
141         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
142         @/bin/mv `basename $@` $(MANDIR)
143         @echo "Making HTML version of $@"
144         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
145
146 $(MANDIR)/lmhosts.5: manpages/lmhosts.5.sgml
147         @echo "Making $@"
148         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
149         @/bin/mv `basename $@` $(MANDIR)
150         @echo "Making HTML version of $@"
151         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
152
153 $(MANDIR)/smbcontrol.1: manpages/smbcontrol.1.sgml
154         @echo "Making $@"
155         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
156         @/bin/mv `basename $@` $(MANDIR)
157         @echo "Making HTML version of $@"
158         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
159
160 $(MANDIR)/smbstatus.1: manpages/smbstatus.1.sgml
161         @echo "Making $@"
162         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
163         @/bin/mv `basename $@` $(MANDIR)
164         @echo "Making HTML version of $@"
165         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
166
167 $(MANDIR)/make_smbcodepage.1: manpages/make_smbcodepage.1.sgml
168         @echo "Making $@"
169         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
170         @/bin/mv `basename $@` $(MANDIR)
171         @echo "Making HTML version of $@"
172         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
173
174 $(MANDIR)/smbd.8: manpages/smbd.8.sgml
175         @echo "Making $@"
176         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
177         @/bin/mv `basename $@` $(MANDIR)
178         @echo "Making HTML version of $@"
179         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
180
181 $(MANDIR)/smbtar.1: manpages/smbtar.1.sgml
182         @echo "Making $@"
183         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
184         @/bin/mv `basename $@` $(MANDIR)
185         @echo "Making HTML version of $@"
186         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
187
188 $(MANDIR)/nmbd.8: manpages/nmbd.8.sgml
189         @echo "Making $@"
190         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
191         @/bin/mv `basename $@` $(MANDIR)
192         @echo "Making HTML version of $@"
193         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
194
195 $(MANDIR)/smbmnt.8: manpages/smbmnt.8.sgml
196         @echo "Making $@"
197         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
198         @/bin/mv `basename $@` $(MANDIR)
199         @echo "Making HTML version of $@"
200         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
201
202 $(MANDIR)/smbumount.8: manpages/smbumount.8.sgml
203         @echo "Making $@"
204         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
205         @/bin/mv `basename $@` $(MANDIR)
206         @echo "Making HTML version of $@"
207         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
208
209 $(MANDIR)/nmblookup.1: manpages/nmblookup.1.sgml
210         @echo "Making $@"
211         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
212         @/bin/mv `basename $@` $(MANDIR)
213         @echo "Making HTML version of $@"
214         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
215
216 $(MANDIR)/smbmount.8: manpages/smbmount.8.sgml
217         @echo "Making $@"
218         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
219         @/bin/mv `basename $@` $(MANDIR)
220         @echo "Making HTML version of $@"
221         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
222
223 $(MANDIR)/swat.8: manpages/swat.8.sgml
224         @echo "Making $@"
225         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
226         @/bin/mv `basename $@` $(MANDIR)
227         @echo "Making HTML version of $@"
228         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
229
230 $(MANDIR)/rpcclient.1: manpages/rpcclient.1.sgml
231         @echo "Making $@"
232         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
233         @/bin/mv `basename $@` $(MANDIR)
234         @echo "Making HTML version of $@"
235         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
236
237 $(MANDIR)/smbpasswd.5: manpages/smbpasswd.5.sgml
238         @echo "Making $@"
239         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
240         @/bin/mv `basename $@` $(MANDIR)
241         @echo "Making HTML version of $@"
242         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
243
244 $(MANDIR)/testparm.1: manpages/testparm.1.sgml
245         @echo "Making $@"
246         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
247         @/bin/mv `basename $@` $(MANDIR)
248         @echo "Making HTML version of $@"
249         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
250
251 $(MANDIR)/samba.7: manpages/samba.7.sgml
252         @echo "Making $@"
253         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
254         @/bin/mv `basename $@` $(MANDIR)
255         @echo "Making HTML version of $@"
256         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
257
258 $(MANDIR)/smbpasswd.8: manpages/smbpasswd.8.sgml
259         @echo "Making $@"
260         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
261         @/bin/mv `basename $@` $(MANDIR)
262         @echo "Making HTML version of $@"
263         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
264
265 $(MANDIR)/testprns.1: manpages/testprns.1.sgml
266         @echo "Making $@"
267         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
268         @/bin/mv `basename $@` $(MANDIR)
269         @echo "Making HTML version of $@"
270         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
271
272 $(MANDIR)/smb.conf.5: manpages/smb.conf.5.sgml
273         @echo "Making $@"
274         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
275         @/bin/mv `basename $@` $(MANDIR)
276         @echo "Making HTML version of $@"
277         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
278
279 $(MANDIR)/smbrun.1: manpages/smbrun.1.sgml
280         @echo "Making $@"
281         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
282         @/bin/mv `basename $@` $(MANDIR)
283         @echo "Making HTML version of $@"
284         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
285
286 $(MANDIR)/wbinfo.1: manpages/wbinfo.1.sgml
287         @echo "Making $@"
288         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
289         @/bin/mv `basename $@` $(MANDIR)
290         @echo "Making HTML version of $@"
291         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
292
293 $(MANDIR)/smbcacls.1: manpages/smbcacls.1.sgml
294         @echo "Making $@"
295         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
296         @/bin/mv `basename $@` $(MANDIR)
297         @echo "Making HTML version of $@"
298         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
299
300 $(MANDIR)/smbsh.1 : manpages/smbsh.1.sgml
301         @echo "Making $@"
302         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
303         @/bin/mv `basename $@` $(MANDIR)
304         @echo "Making HTML version of $@"
305         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
306
307 $(MANDIR)/winbindd.8: manpages/winbindd.8.sgml
308         @echo "Making $@"
309         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
310         @/bin/mv `basename $@` $(MANDIR)
311         @echo "Making HTML version of $@"
312         @$(JADE) -t sgml -V nochunks -d $$SGML_SHARE/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
313
314
315 ## Clean Rule
316 clean: 
317         /bin/rm -f manpage.*