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>
7 # Please see http://www.samba.org/samba/cvs.html
8 # for information on getting the latest
9 # source and documentation source files.
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
26 ## This part contains only rules. You shouldn't need to change it
27 ## if you are adding docs
29 TEXSTYLESHEET
= @TEXSTYLESHEET@
30 XSLTPROC
= @XSLTPROC@ @PAPERSIZE@
--stringparam samba-book
1 --stringparam duplicate_ulinks
"@DUPLICATE_ULINKS@" @FONTSIZE@ @CROP@
39 MAKEINDEX
= @MAKEINDEX@
40 IMAGEPROJDIR
= $(PROJDOC
)/imagefiles
42 SMBDOTCONFDOC
= smbdotconf
50 PDFLATEX
= TEXINPUTS
=xslt
/latex
:.
: @PDFLATEX@
--interaction nonstopmode
51 LATEX
= TEXINPUTS
=xslt
/latex
:.
: @LATEX@
--interaction nonstopmode
53 MANPAGES
=$(patsubst %,$(MANDIR
)/%,$(MANPAGES_NAMES
))
54 MANPAGES_HTML
=$(patsubst %,$(HTMLDIR
)/%.html
,$(MANPAGES_NAMES
))
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
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"
78 everything
: manpages pdf html-single html htmlman htmlfaq txt ps
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
95 Samba-HOWTO-Collection.xml
: $(PROJDOC
)/samba-doc.xml
$(PROJDOC_DEPS
)
96 $(XSLTPROC
) --xinclude
--output
$@ xslt
/expand-sambadoc.xsl
$<
98 Samba-Developers-Guide.xml
: $(DEVDOC
)/dev-doc.xml
$(DEVDOC_DEPS
)
99 $(XSLTPROC
) --xinclude
--output
$@ xslt
/expand-sambadoc.xsl
$<
101 $(PROJDOC
)/attributions.xml
: $(PROJDOC
)/samba-doc.xml
102 @echo
> $@
# Make sure we don't get recursive dependencies, etc!
103 @echo
"Generating attributions page"
104 @
$(XSLTPROC
) --output
$@ xslt
/generate-attributions.xsl
$<
106 $(DEVDOC
)/attributions.xml
: $(DEVDOC
)/dev-doc.xml
107 @echo
> $@
# Make sure we don't get recursive dependencies, etc!
108 @echo
"Generating attributions page"
109 @
$(XSLTPROC
) --output
$@ xslt
/generate-attributions.xsl
$<
112 @
rm -f
*.xml
$(MANPAGES
) $(TXTDIR
)/*.txt
$(PSDIR
)/*.ps
$(PDFDIR
)/*.pdf
113 @
rm -f
$(SMBDOTCONFDOC
)/parameters.
*.xml
$(DVIDIR
)/*.
dvi
114 @
rm -f samba-doc.
* dev-doc.
* $(PROJDOC
)/attributions.xml
$(DEVDOC
)/attributions.xml
115 @
rm -f
$(IMAGEPROJDIR
)/*.eps
$(MANPROJDIR
)/smb.conf
.5.xml
121 $(TXTDIR
)/%.txt
: %.xml
122 @echo
"Converting $< to plain text..."
123 @
$(XMLTO
) txt
-o
$(TXTDIR
) $< > $@
127 @echo
"Converting $< to LaTeX..."
128 @
$(XSLTPROC
) --output
$@ xslt
/latex.xsl
$<
131 $(PDFDIR
)/%.pdf
: %.
tex
135 mv
$(patsubst %.
tex,%.pdf
,$<) $@
137 epsimages
: $(PROJDOC_IMAGES_EPS
)
140 $(DVIDIR
)/%.
dvi: %.
tex epsimages
144 mv
$(patsubst %.
tex,%.
dvi,$<) $@
147 @
$(PNGTOPNM
) $< |
$(PNMTOPS
) > $@
150 $(PSDIR
)/%.ps
: $(DVIDIR
)/%.
dvi
153 # Single large HTML files
158 CSS
: $(HTMLDIR
) xslt
/html
/samba.css
159 @cp xslt
/html
/samba.css
$(HTMLDIR
)/
161 $(HTMLDIR
)/Samba-HOWTO-Collection.html
: Samba-HOWTO-Collection.xml
$(PROJDOC_DEPS
) $(PROJDOC_IMAGES_PNG
)
162 @
$(XSLTPROC
) --output
$@ xslt
/html.xsl
$<
164 $(HTMLDIR
)/Samba-Developers-Guide.html
: Samba-Developers-Guide.xml
$(DEVDOC_DEPS
)
165 @
$(XSLTPROC
) --output
$@ xslt
/html.xsl
$<
168 $(HTMLDIR
)/%.html
: $(MANPROJDOC
)/%.xml
169 @
$(XSLTPROC
) --output
$@ xslt
/html.xsl
$<
172 $(SMBDOTCONFDOC
)/parameters.
all.xml
: $(SMBDOTCONFDOC
)/generate-file-list.sh
173 @cd
$(SMBDOTCONFDOC
) && \
174 /bin
/sh generate-file-list.sh
>parameters.
all.xml
&& \
177 $(SMBDOTCONFDOC
)/parameters.global.xml
: $(SMBDOTCONFDOC
)/parameters.
all.xml
$(SMBDOTCONFDOC
)/generate-context.xsl
178 @cd
$(SMBDOTCONFDOC
) && \
179 $(XSLTPROC
) --xinclude \
180 --param smb.context
"'G'" \
181 --output parameters.global.xml \
182 generate-context.xsl parameters.
all.xml
&& \
185 $(SMBDOTCONFDOC
)/parameters.service.xml
: $(SMBDOTCONFDOC
)/parameters.
all.xml
$(SMBDOTCONFDOC
)/generate-context.xsl
186 @cd
$(SMBDOTCONFDOC
) && \
187 $(XSLTPROC
) --xinclude \
188 --param smb.context
"'S'" \
189 --output parameters.service.xml \
190 generate-context.xsl parameters.
all.xml
&& \
193 smb.conf
.5.xml
: $(SMBDOTCONFDOC
)/smb.conf
.5.xml
$(SMBDOTCONFDOC
)/parameters.
all.xml \
194 $(SMBDOTCONFDOC
)/parameters.global.xml
$(SMBDOTCONFDOC
)/parameters.service.xml
195 @
$(XSLTPROC
) --xinclude
--output
$@ xslt
/expand-sambadoc.xsl
$<
197 $(MANPROJDIR
)/smb.conf
.5.xml
: smb.conf
.5.xml
203 $(MANDIR
)/%: $(MANPROJDOC
)/%.xml
204 @
$(XSLTPROC
) xslt
/expand-sambadoc.xsl
$< |
$(XSLTPROC
) xslt
/man.xsl
- > $@
206 $(MANDIR
)/smb.conf
.5: smb.conf
.5.xml
207 @
$(XSLTPROC
) xslt
/man.xsl
$< > $@
209 undocumented
: $(SMBDOTCONFDOC
)/parameters.
all.xml
210 $(PERL
) scripts
/find_missing_doc.pl ..
/..