1 #################################################################
2 # Makefile.in for Samba Documentation
4 # James Moore <jmoore@php.net>
5 # Gerald Carter <jerry@samba.org>
6 # Jelmer Vernooij <jelmer@samba.org>
8 # Please see http://www.samba.org/samba/cvs.html
9 # for information on getting the latest
10 # source and documentation source files.
24 PLUCKERBUILD
= @PLUCKERBUILD@
25 PDFLATEX
= TEXINPUTS
=xslt
/latex
:.
: @PDFLATEX@
26 LATEX
= TEXINPUTS
=xslt
/latex
:.
: @LATEX@
29 PDFLATEX
+= --interaction nonstopmode
30 LATEX
+= --interaction nonstopmode
36 MANDIR
=$(OUTPUTDIR
)/manpages
40 MAKEINDEX
= @MAKEINDEX@
41 IMAGEPROJDIR
= $(PROJDOC
)/imagefiles
43 EXAMPLESDIR
= examples
45 SMBDOTCONFDOC
= smbdotconf
49 TXTDIR
= $(OUTPUTDIR
)/textdocs
51 FAQDIR
= $(OUTPUTDIR
)/faq
52 HTMLDIR
=$(OUTPUTDIR
)/htmldocs
53 PLUCKERDIR
=$(OUTPUTDIR
)/plucker
55 # Lists of files to process
56 LATEX_FIGURES
= xslt
/figures
/caution.pdf xslt
/figures
/important.pdf xslt
/figures
/note.pdf xslt
/figures
/tip.pdf xslt
/figures
/warning.pdf
57 MANPAGES_SOURCES
= $(wildcard $(MANPROJDOC
)/*.?.xml
)
58 MANPAGES
= $(patsubst $(MANPROJDOC
)/%.xml
,$(MANDIR
)/%,$(MANPAGES_SOURCES
)) $(MANDIR
)/smb.conf
.5
59 MANPAGES_HTML
= $(patsubst $(MANPROJDOC
)/%.xml
,$(HTMLDIR
)/%.html
,$(MANPAGES_SOURCES
)) $(HTMLDIR
)/smb.conf
.5.html
60 MANPAGES_PLUCKER
= $(patsubst $(MANPROJDOC
)/%.xml
,$(PLUCKERDIR
)/%.pdb
,$(MANPAGES_SOURCES
)) $(PLUCKERDIR
)/smb.conf
.5.pdb
62 PROJDOC_IMAGES_PNG
= $(wildcard $(IMAGEPROJDIR
)/*.png
)
63 PROJDOC_IMAGES_EPS
=$(patsubst %.png
,%.eps
,$(wildcard $(IMAGEPROJDIR
)/*.png
))
64 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
65 DEVDOC_DEPS
= $(DEVDOC
)/*.xml
$(DEVDOC
)/attributions.xml
68 @echo
"Supported make targets:"
69 @echo
"release - Build the docs needed for a Samba release"
70 @echo
"pdf - Build PDF version of book"
71 @echo
"tex - Build Latex version of book"
72 @echo
"dvi - Build Device Independant File of book"
73 @echo
"ps - Build PostScript version of book"
74 @echo
"manpages - Build manpages"
75 @echo
"txt - Build plain text version of HOWTO Collection and Developers Guide"
76 @echo
-n
"html-single - Build single file HTML version of HOWTO Collection"
77 @echo
" and developers guide"
78 @echo
"html - Build HTML version of HOWTO Collection and Developers Guide"
79 @echo
"htmlman - Build html version of manpages"
80 @echo
"htmlfaq - Build html version of the FAQ"
81 @echo
"plucker - Build HOWTO, Developers Guide, man pages, and FAQ in Plucker format for PDA"
82 @echo
"undocumented - Output list of undocumented smb.conf options"
83 @echo
"samples - Extract examples"
84 @echo
"files - Extract other files"
85 @echo
"everything - Build all of the above"
87 everything
: manpages pdf html-single html htmlman htmlfaq txt ps
89 release
: manpages htmlman html html-single htmlfaq pdf
93 pdf
: $(PDFDIR
) $(PDFDIR
)/Samba-HOWTO-Collection.pdf
$(PDFDIR
)/Samba-Developers-Guide.pdf
95 dvi: $(DVIDIR
) $(DVIDIR
)/Samba-HOWTO-Collection.
dvi $(DVIDIR
)/Samba-Developers-Guide.
dvi
97 ps
: $(PSDIR
) $(PSDIR
)/Samba-HOWTO-Collection.ps
$(PSDIR
)/Samba-Developers-Guide.ps
99 txt
: $(TXTDIR
) $(TXTDIR
)/Samba-HOWTO-Collection.txt
$(TXTDIR
)/Samba-Developers-Guide.txt
101 htmlman
: $(HTMLDIR
) $(MANPAGES_HTML
) CSS
103 htmlfaq
: $(HTMLDIR
) CSS
104 $(XSLTPROC
) --stringparam base.
dir "$(FAQDIR)/" --stringparam root.filename samba-faq xslt
/html-chunk.xsl
$(FAQPROJDOC
)/sambafaq.xml
105 html-single
: $(HTMLDIR
) CSS
$(HTMLDIR
)/Samba-HOWTO-Collection.html
$(HTMLDIR
)/Samba-Developers-Guide.html
106 @if
[ ! -d
$(HTMLDIR
)/images
/ ]; then \
107 mkdir
$(HTMLDIR
)/images
/; \
109 && cp
-p projdoc
/imagefiles
/*png
$(HTMLDIR
)/images
/
111 html
: $(HTMLDIR
) CSS Samba-HOWTO-Collection.xml
$(HTMLDIR
)/Samba-Developers-Guide.html
112 $(XSLTPROC
) -o
"$(HTMLDIR)/" xslt
/html-chunk.xsl Samba-HOWTO-Collection.xml
113 @if
[ ! -d
$(HTMLDIR
)/images
/ ]; then \
114 mkdir
$(HTMLDIR
)/images
/; \
116 && cp
-p projdoc
/imagefiles
/*png
$(HTMLDIR
)/images
/
118 manpages
: $(MANDIR
) $(MANPAGES
)
120 tex: Samba-HOWTO-Collection.
tex Samba-Developers-Guide.
tex gpl.
tex
122 plucker
: html-single htmlman htmlfaq
$(PLUCKERDIR
) $(MANPAGES_PLUCKER
) $(PLUCKERDIR
)/Samba-Developers-Guide.pdb
$(PLUCKERDIR
)/Samba-HOWTO-Collection.pdb
123 $(PLUCKERBUILD
) -v
-M2
--stayonhost
--noimages
--zlib-compression
-H file
:$(FAQDIR
)/samba-faq.html
-f samba-faq
-p
$(PLUCKERDIR
)
125 Samba-HOWTO-Collection.xml
: $(PROJDOC
)/samba-doc.xml
$(PROJDOC_DEPS
)
126 $(XSLTPROC
) --stringparam noreference
1 --xinclude
--output
$@ xslt
/expand-sambadoc.xsl
$<
128 Samba-Guide.xml
: $(GUIDEDOC
)/guide-main.xml
129 $(XSLTPROC
) --stringparam noreference
1 --xinclude
--output
$@ xslt
/expand-sambadoc.xsl
$<
131 Samba-Developers-Guide.xml
: $(DEVDOC
)/dev-doc.xml
$(DEVDOC_DEPS
)
132 $(XSLTPROC
) --stringparam noreference
1 --xinclude
--output
$@ xslt
/expand-sambadoc.xsl
$<
134 $(PROJDOC
)/attributions.xml
: $(PROJDOC
)/samba-doc.xml
135 @echo
> $@
# Make sure we don't get recursive dependencies, etc!
136 $(XSLTPROC
) --output
$@ xslt
/generate-attributions.xsl
$<
138 $(DEVDOC
)/attributions.xml
: $(DEVDOC
)/dev-doc.xml
139 @echo
> $@
# Make sure we don't get recursive dependencies, etc!
140 $(XSLTPROC
) --output
$@ xslt
/generate-attributions.xsl
$<
143 rm -f
*.xml
$(MANPAGES
) $(TXTDIR
)/*.txt
$(PSDIR
)/*.ps \
144 $(PDFDIR
)/*.pdf
$(FAQDIR
)/*.html
$(HTMLDIR
)/*html
$(HTMLDIR
)/samba.css
145 rm -f xslt
/figures
/*pdf
146 rm -f
$(SMBDOTCONFDOC
)/parameters.
*.xml
$(DVIDIR
)/*.
dvi
147 rm -f samba-doc.
* dev-doc.
* $(PROJDOC
)/changelog.xml
$(PROJDOC
)/attributions.xml
$(DEVDOC
)/attributions.xml
148 rm -f Samba-HOWTO-Collection.
*
149 rm -f Samba-Developers-Guide.
*
151 rm -f
$(IMAGEPROJDIR
)/*.eps
$(MANPROJDOC
)/smb.conf
.5.xml
152 rm -f
$(PLUCKERDIR
)/*.pdb
158 $(TXTDIR
)/%.txt
: %.xml
159 $(XMLTO
) txt
-o
$(TXTDIR
) $< > $@
163 $(XSLTPROC
) --output
$@ xslt
/latex.xsl
$<
166 $(WGET
) http
://www.gnu.org
/licenses
/gpl.
tex
168 latexfigures
: $(LATEX_FIGURES
)
171 $(PDFDIR
)/%.pdf
: %.
tex latexfigures gpl.
tex
173 $(MAKEINDEX
) `echo $< | sed -e 's/.tex//'`
176 mv
$(patsubst %.
tex,%.pdf
,$<) $@
178 epsimages
: $(PROJDOC_IMAGES_EPS
)
181 $(DVIDIR
)/%.
dvi: %.
tex epsimages gpl.
tex
183 $(MAKEINDEX
) `echo $< | sed -e 's/.tex//'`
186 mv
$(patsubst %.
tex,%.
dvi,$<) $@
189 $(PNGTOPNM
) $< |
$(PNMTOPS
) > $@
192 $(PSDIR
)/%.ps
: $(DVIDIR
)/%.
dvi
195 xslt
/figures
/%.pdf
: xslt
/figures
/%.eps
198 # Single large HTML files
206 CSS
: $(HTMLDIR
) xslt
/html
/samba.css
207 cp xslt
/html
/samba.css
$(HTMLDIR
)/
209 $(HTMLDIR
)/Samba-HOWTO-Collection.html
: Samba-HOWTO-Collection.xml
$(PROJDOC_DEPS
) $(PROJDOC_IMAGES_PNG
)
210 $(XSLTPROC
) --output
$@ xslt
/html.xsl
$<
212 $(HTMLDIR
)/Samba-Developers-Guide.html
: Samba-Developers-Guide.xml
$(DEVDOC_DEPS
)
213 $(XSLTPROC
) --output
$@ xslt
/html.xsl
$<
215 $(HTMLDIR
)/%.html
: %.xml
216 $(XSLTPROC
) --output
$@ xslt
/html.xsl
$<
218 $(PLUCKERDIR
)/%.pdb
: $(HTMLDIR
)/%.html
219 $(PLUCKERBUILD
) -v
-M1
--stayonhost
--noimages
--zlib-compression
-H file
:$< -f
$(patsubst $(PLUCKERDIR
)/%.pdb
,%,$@
) -p
$(PLUCKERDIR
)
221 %.xml
: $(MANPROJDOC
)/%.xml
222 $(XSLTPROC
) --stringparam noreference
1 --output
$@ xslt
/expand-sambadoc.xsl
$<
225 $(SMBDOTCONFDOC
)/parameters.
all.xml
: $(SMBDOTCONFDOC
)/generate-file-list.sh
226 @cd
$(SMBDOTCONFDOC
) && \
227 /bin
/sh generate-file-list.sh
>parameters.
all.xml
&& \
230 $(SMBDOTCONFDOC
)/parameters.global.xml
: $(SMBDOTCONFDOC
)/parameters.
all.xml
$(SMBDOTCONFDOC
)/generate-context.xsl
231 @cd
$(SMBDOTCONFDOC
) && \
232 $(XSLTPROC
) --xinclude \
233 --param smb.context
"'G'" \
234 --output parameters.global.xml \
235 generate-context.xsl parameters.
all.xml
&& \
238 $(SMBDOTCONFDOC
)/parameters.service.xml
: $(SMBDOTCONFDOC
)/parameters.
all.xml
$(SMBDOTCONFDOC
)/generate-context.xsl
239 @cd
$(SMBDOTCONFDOC
) && \
240 $(XSLTPROC
) --xinclude \
241 --param smb.context
"'S'" \
242 --output parameters.service.xml \
243 generate-context.xsl parameters.
all.xml
&& \
246 smb.conf
.5.xml
: $(SMBDOTCONFDOC
)/smb.conf
.5.xml
$(SMBDOTCONFDOC
)/parameters.
all.xml \
247 $(SMBDOTCONFDOC
)/parameters.global.xml
$(SMBDOTCONFDOC
)/parameters.service.xml
248 $(XSLTPROC
) --stringparam noreference
1 --xinclude
--output
$@ xslt
/expand-sambadoc.xsl
$<
254 $(XSLTPROC
) --output
$@ xslt
/man.xsl
$<
256 # Find undocumented parameters
258 undocumented
: $(SMBDOTCONFDOC
)/parameters.
all.xml
259 $(PERL
) scripts
/find_missing_doc.pl ..
/..
261 # Examples and the like
266 files
: $(PROJDOC
)/samba-doc.xml
$(PROJDOC
)/attributions.xml
$(EXAMPLESDIR
)
267 $(XSLTPROC
) xslt
/extract-smbfiles.xsl
$< > /dev
/null
269 samples
: $(EXAMPLESDIR
) Samba-HOWTO-Collection.xml
270 $(XSLTPROC
) xslt
/extract-examples.xsl Samba-HOWTO-Collection.xml
> /dev
/null
2> examples
/README
271 for I in examples
/*.conf
; do
{ .
/scripts
/indent-smb.conf.pl
< $$I > $$I.tmp
; mv
$$I.tmp
$$I; } done
273 howto
: $(PDFDIR
)/Samba-HOWTO-Collection.pdf
274 guide
: $(PDFDIR
)/Samba-Guide.pdf
276 %/changelog.xml
: % $(wildcard %/CVS
/*)
277 $(CVS2CL
) --stdout
--xml
$< |
$(XSLTPROC
) --output
$@ xslt
/genchangelog.xsl
-