merge from 2.2
[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 PERL=@PERL@
19 #CATALOG = @CATALOG@
20 MANDIR=../manpages
21 HTMLDIR=../htmldocs
22
23 #Stylesheets and Dependicies
24 SGML_SHARE=@SGML_SHARE@
25 #SGML_CATALOG_FILES=$(SGML_CATALOG_FILES):./dbsgml/catalog
26 HTML_STYLESHEET = $(srcdir)/stylesheets/html.dsl
27 HTML_DEPS = $(srcdir)/stylesheets/html-common.dsl $(srcdir)/stylesheets/common.dsl
28
29 MANPAGES=$(MANDIR)/findsmb.1 $(MANDIR)/smbclient.1 \
30         $(MANDIR)/smbspool.8 $(MANDIR)/lmhosts.5 \
31         $(MANDIR)/smbcontrol.1  $(MANDIR)/smbstatus.1 \
32         $(MANDIR)/make_smbcodepage.1  $(MANDIR)/smbd.8 \
33         $(MANDIR)/smbtar.1 $(MANDIR)/nmbd.8 $(MANDIR)/smbmnt.8 \
34         $(MANDIR)/smbumount.8 $(MANDIR)/nmblookup.1 \
35         $(MANDIR)/smbmount.8 $(MANDIR)/swat.8 $(MANDIR)/rpcclient.1      \
36         $(MANDIR)/smbpasswd.5 $(MANDIR)/testparm.1 $(MANDIR)/samba.7 \
37         $(MANDIR)/smbpasswd.8 $(MANDIR)/testprns.1 \
38         $(MANDIR)/smb.conf.5 $(MANDIR)/wbinfo.1 \
39         $(MANDIR)/smbcacls.1 $(MANDIR)/smbsh.1 $(MANDIR)/winbindd.8 
40
41 SGMLMANSRC=manpages/findsmb.1.sgml manpages/smbclient.1.sgml \
42         manpages/smbspool.8.sgml manpages/lmhosts.5.sgml \
43         manpages/smbcontrol.1.sgml manpages/smbstatus.1.sgml \
44         manpages/make_smbcodepage.1.sgml  manpages/smbd.8.sgml \
45         manpages/smbtar.1.sgml manpages/nmbd.8.sgml manpages/smbmnt.8.sgml \
46         manpages/smbumount.8.sgml manpages/nmblookup.1.sgml \
47         manpages/smbmount.8.sgml manpages/swat.8.sgml \
48         manpages/rpcclient.1.sgml manpages/smbpasswd.5.sgml \
49         manpages/testparm.1.sgml manpages/samba.7.sgml \
50         manpages/smbpasswd.8.sgml manpages/testprns.1.sgml \
51         manpages/smb.conf.5.sgml \
52         manpages/wbinfo.1.sgml manpages/smbcacls.1.sgml \
53         manpages/smbsh.1.sgml manpages/winbindd.8.sgml
54
55 HOWTOSRC=projdoc/DOMAIN_MEMBER.sgml projdoc/NT_Security.sgml \
56         projdoc/msdfs_setup.sgml projdoc/printer_driver2.sgml \
57         projdoc/UNIX_INSTALL.sgml projdoc/winbind.sgml projdoc/OS2-Client-HOWTO.sgml \
58         projdoc/Samba-PDC-HOWTO.sgml projdoc/ENCRYPTION.sgml
59
60 FAQSRC=faq/samba-pdc-faq.sgml
61
62
63
64 ######################################################################
65 # Make instructions
66 ######################################################################
67 all: man
68
69 man: $(MANPAGES)
70
71 FAQ: $(FAQSRC)
72         @echo Building SAMBA PDC FAQ...
73         @(for i in $?; do \
74            htmlfile=`basename $$i | sed "s/\.sgml/\.html/g"`; \
75            echo "Making $$htmlfile"; \
76            $(JADE) -t sgml -V nochunks -d  $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl \
77               -f /tmp/jade.log $$i > ../htmldocs/$$htmlfile; \
78            cat /tmp/jade.log | grep -v DTDDECL; \
79            /bin/rm -f /tmp/jade.log; \
80         done)
81
82 HOWTO: $(HOWTOSRC)
83         @echo Building HOWTO pages...
84         @(for i in $?; do \
85            htmlfile=`basename $$i | sed "s/\.sgml/\.html/g"`; \
86            echo "Making $$htmlfile"; \
87            cat $$i | $(PERL) scripts/make-article.pl > /tmp/`basename $$i`; \
88            $(JADE) -t sgml -V nochunks -d  $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl \
89               -f /tmp/jade.log /tmp/`basename $$i` > ../htmldocs/$$htmlfile; \
90            cat /tmp/jade.log | grep -v DTDDECL; \
91            /bin/rm -f /tmp/jade.log /tmp/`basename $$i`; \
92         done)
93
94
95 ## I'm using htmldoc here to produc the PDF output.  If you want
96 ## Postscript output, you can run 
97 ##
98 ##           sgmltools -b ps projdoc/samba-doc.sgml
99 ##
100 proj-doc: 
101         echo Building Samba-HOWTO-Collections...
102         @(cd projdoc; $(JADE) -t sgml -V nochunks -d  $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl samba-doc.sgml > ../samba-doc.html)
103         @$(HTMLDOC) -f ../Samba-HOWTO-Collection.pdf samba-doc.html
104         @/bin/mv -f samba-doc.html ../htmldocs/Samba-HOWTO-Collection.html
105
106
107
108
109
110 ## generate all HTML man pages
111 man-html-all: $(SGMLMANSRC)
112         @echo Building HTML formatted man pages...
113         @(for i in $?; do \
114            htmlfile=`basename $$i | sed "s/\.sgml/\.html/g"`; \
115            echo "Making $$htmlfile"; \
116            $(JADE) -t sgml -V nochunks -d  $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl \
117               -f /tmp/jade.log $$i > ../htmldocs/$$htmlfile; \
118            cat /tmp/jade.log | grep -v DTDDECL; \
119            /bin/rm -f /tmp/jade.log; \
120         done)
121
122 ## generate all man pages
123 man-all: $(SGMLMANSRC)
124         @echo Building man pages...
125         @(for i in $?; do \
126                 manfile=`basename $$i | sed "s/\.sgml//g"`; \
127                 echo "Making $$manfile"; \
128                 $(ONSGMLS) -f /tmp/docbook2x.log $$i | $(SGMLSPL) \
129                    $(SGML_SHARE)/docbook2X/docbook2man-spec.pl; \
130                 cat /tmp/docbook2x.log | grep -v DTDDECL; \
131                 /bin/rm -f /tmp/docbook2x.log; \
132                 cat $$manfile | $(PERL) scripts/strip-links.pl > $(MANDIR)/$$manfile; \
133                 /bin/rm -f $$manfile; \
134           done)
135
136
137
138
139 ##
140 ## these rules are for building individual files
141 ##
142 $(MANDIR)/findsmb.1:  manpages/findsmb.1.sgml
143         @echo "Making $@"
144         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
145         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
146         @/bin/rm -f `basename $@`
147         @echo "Making HTML version of $@"
148         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
149
150 $(MANDIR)/smbclient.1: manpages/smbclient.1.sgml
151         @echo "Making $@"
152         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
153         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
154         @/bin/rm -f `basename $@`
155         @echo "Making HTML version of $@"
156         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
157
158 $(MANDIR)/smbspool.8: manpages/smbspool.8.sgml
159         @echo "Making $@"
160         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
161         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
162         @/bin/rm -f `basename $@`
163         @echo "Making HTML version of $@"
164         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
165
166 $(MANDIR)/lmhosts.5: manpages/lmhosts.5.sgml
167         @echo "Making $@"
168         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
169         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
170         @/bin/rm -f `basename $@`
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)/smbcontrol.1: manpages/smbcontrol.1.sgml
175         @echo "Making $@"
176         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
177         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
178         @/bin/rm -f `basename $@`
179         @echo "Making HTML version of $@"
180         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
181
182 $(MANDIR)/smbstatus.1: manpages/smbstatus.1.sgml
183         @echo "Making $@"
184         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
185         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
186         @/bin/rm -f `basename $@`
187         @echo "Making HTML version of $@"
188         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
189
190 $(MANDIR)/make_smbcodepage.1: manpages/make_smbcodepage.1.sgml
191         @echo "Making $@"
192         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
193         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
194         @/bin/rm -f `basename $@`
195         @echo "Making HTML version of $@"
196         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
197
198 $(MANDIR)/smbd.8: manpages/smbd.8.sgml
199         @echo "Making $@"
200         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
201         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
202         @/bin/rm -f `basename $@`
203         @echo "Making HTML version of $@"
204         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
205
206 $(MANDIR)/smbtar.1: manpages/smbtar.1.sgml
207         @echo "Making $@"
208         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
209         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
210         @/bin/rm -f `basename $@`
211         @echo "Making HTML version of $@"
212         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
213
214 $(MANDIR)/nmbd.8: manpages/nmbd.8.sgml
215         @echo "Making $@"
216         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
217         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
218         @/bin/rm -f `basename $@`
219         @echo "Making HTML version of $@"
220         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
221
222 $(MANDIR)/smbmnt.8: manpages/smbmnt.8.sgml
223         @echo "Making $@"
224         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
225         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
226         @/bin/rm -f `basename $@`
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)/smbumount.8: manpages/smbumount.8.sgml
231         @echo "Making $@"
232         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
233         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
234         @/bin/rm -f `basename $@`
235         @echo "Making HTML version of $@"
236         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
237
238 $(MANDIR)/nmblookup.1: manpages/nmblookup.1.sgml
239         @echo "Making $@"
240         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
241         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
242         @/bin/rm -f `basename $@`
243         @echo "Making HTML version of $@"
244         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
245
246 $(MANDIR)/smbmount.8: manpages/smbmount.8.sgml
247         @echo "Making $@"
248         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
249         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
250         @/bin/rm -f `basename $@`
251         @echo "Making HTML version of $@"
252         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
253
254 $(MANDIR)/swat.8: manpages/swat.8.sgml
255         @echo "Making $@"
256         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
257         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
258         @/bin/rm -f `basename $@`
259         @echo "Making HTML version of $@"
260         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
261
262 $(MANDIR)/rpcclient.1: manpages/rpcclient.1.sgml
263         @echo "Making $@"
264         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
265         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
266         @/bin/rm -f `basename $@`
267         @echo "Making HTML version of $@"
268         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
269
270 $(MANDIR)/smbpasswd.5: manpages/smbpasswd.5.sgml
271         @echo "Making $@"
272         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
273         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
274         @/bin/rm -f `basename $@`
275         @echo "Making HTML version of $@"
276         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
277
278 $(MANDIR)/testparm.1: manpages/testparm.1.sgml
279         @echo "Making $@"
280         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
281         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
282         @/bin/rm -f `basename $@`
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)/samba.7: manpages/samba.7.sgml
287         @echo "Making $@"
288         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
289         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
290         @/bin/rm -f `basename $@`
291         @echo "Making HTML version of $@"
292         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
293
294 $(MANDIR)/smbpasswd.8: manpages/smbpasswd.8.sgml
295         @echo "Making $@"
296         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
297         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
298         @/bin/rm -f `basename $@`
299         @echo "Making HTML version of $@"
300         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
301
302 $(MANDIR)/testprns.1: manpages/testprns.1.sgml
303         @echo "Making $@"
304         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
305         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
306         @/bin/rm -f `basename $@`
307         @echo "Making HTML version of $@"
308         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
309
310 $(MANDIR)/smb.conf.5: manpages/smb.conf.5.sgml
311         @echo "Making $@"
312         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
313         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
314         @/bin/rm -f `basename $@`
315         @echo "Making HTML version of $@"
316         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
317
318 $(MANDIR)/wbinfo.1: manpages/wbinfo.1.sgml
319         @echo "Making $@"
320         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
321         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
322         @/bin/rm -f `basename $@`
323         @echo "Making HTML version of $@"
324         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
325
326 $(MANDIR)/smbcacls.1: manpages/smbcacls.1.sgml
327         @echo "Making $@"
328         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
329         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
330         @/bin/rm -f `basename $@`
331         @echo "Making HTML version of $@"
332         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
333
334 $(MANDIR)/smbsh.1 : manpages/smbsh.1.sgml
335         @echo "Making $@"
336         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
337         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
338         @/bin/rm -f `basename $@`
339         @echo "Making HTML version of $@"
340         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
341
342 $(MANDIR)/winbindd.8: manpages/winbindd.8.sgml
343         @echo "Making $@"
344         @$(ONSGMLS) $< | $(SGMLSPL) $(SGML_SHARE)/docbook2X/docbook2man-spec.pl
345         @cat `basename $@` | $(PERL) scripts/strip-links.pl > $@
346         @/bin/rm -f `basename $@`
347         @echo "Making HTML version of $@"
348         @$(JADE) -t sgml -V nochunks -d $(SGML_SHARE)/dsssl/docbook/html/docbook.dsl $< > $(HTMLDIR)/`basename $< | sed "s/\.sgml/\.html/g"`
349
350
351 ## Clean Rule
352 clean: 
353         /bin/rm -f manpage.*