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.
23 PLUCKERBUILD
= @PLUCKERBUILD@
24 PDFLATEX
= TEXINPUTS
=xslt
/latex
:.
: @PDFLATEX@
25 LATEX
= TEXINPUTS
=xslt
/latex
:.
: @LATEX@
28 PDFLATEX
+= --interaction nonstopmode
29 LATEX
+= --interaction nonstopmode
34 OUTPUTDIR
= $(TOPDIR
)/output
35 ARCHIVEDIR
= $(OUTPUTDIR
)/archive
37 MANDIR
= $(OUTPUTDIR
)/manpages
39 MANPAGEDIR
= $(TOPDIR
)/manpages
40 HOWTODIR
= $(TOPDIR
)/howto
41 GUIDEDOC
= $(TOPDIR
)/guide
42 DEVDOCDIR
= $(TOPDIR
)/devel
43 MAKEINDEX
= @MAKEINDEX@
44 IMAGEPROJDIR
= $(HOWTODIR
)/imagefiles
45 IMAGEGUIDEDIR
= $(GUIDEDOC
)/images
46 EXAMPLESDIR
= $(TOPDIR
)/examples
47 SMBDOTCONFDOC
= $(TOPDIR
)/smbdotconf
51 TXTDIR
= $(OUTPUTDIR
)/textdocs
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 $(MANPAGEDIR
)/*.?.xml
)
58 MANPAGES
= $(patsubst $(MANPAGEDIR
)/%.xml
,$(MANDIR
)/%,$(MANPAGES_SOURCES
)) $(MANDIR
)/smb.conf
.5
59 MANPAGES_HTML
= $(patsubst $(MANPAGEDIR
)/%.xml
,$(HTMLDIR
)/%.html
,$(MANPAGES_SOURCES
)) $(HTMLDIR
)/smb.conf
.5.html
60 MANPAGES_PLUCKER
= $(patsubst $(MANPAGEDIR
)/%.xml
,$(PLUCKERDIR
)/%.pdb
,$(MANPAGES_SOURCES
)) $(PLUCKERDIR
)/smb.conf
.5.pdb
62 HOWTODIR_IMAGES_PNG
= $(wildcard $(IMAGEPROJDIR
)/*.png
)
63 GUIDEDOC_IMAGES_PNG
= $(wildcard $(IMAGEGUIDEDIR
)/*.png
)
64 HOWTODIR_IMAGES_EPS
=$(patsubst %.png
,%.eps
,$(wildcard $(IMAGEPROJDIR
)/*.png
))
65 HOWTODIR_DEPS
= $(HOWTODIR
)/*.xml
$(HOWTODIR
)/attributions.xml
$(MANPAGEDIR
)/*.xml
$(SMBDOTCONFDOC
)/smb.conf
.5.xml
$(SMBDOTCONFDOC
)/parameters.
all.xml
$(SMBDOTCONFDOC
)/parameters.global.xml
$(SMBDOTCONFDOC
)/parameters.service.xml
66 DEVDOCDIR_DEPS
= $(DEVDOCDIR
)/*.xml
$(DEVDOCDIR
)/attributions.xml
69 @echo
"Supported make targets:"
70 @echo
"release - Build the docs needed for a Samba release"
71 @echo
"pdf - Build PDF version of book"
72 @echo
"tex - Build Latex version of book"
73 @echo
"dvi - Build Device Independant File of book"
74 @echo
"ps - Build PostScript version of book"
75 @echo
"manpages - Build manpages"
76 @echo
"txt - Build plain text version of HOWTO Collection and Developers Guide"
77 @echo
-n
"html-single - Build single file HTML version of HOWTO Collection"
78 @echo
" and developers guide"
79 @echo
"html - Build HTML version of HOWTO Collection and Developers Guide"
80 @echo
"htmlman - Build html version of manpages"
81 @echo
"plucker - Build HOWTO, Developers Guide, man pages 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
"all - Build all docs that can be build using the utilities found by configure"
86 @echo
"everything - Build all of the above"
90 everything
: manpages pdf html-single html htmlman txt ps
92 release
: manpages htmlman
$(HTMLDIR
)/howto
$(HTMLDIR
)/guide html-single pdf guide
96 pdf
: $(PDFDIR
) $(PDFDIR
)/Samba-HOWTO-Collection.pdf
$(PDFDIR
)/Samba-Developers-Guide.pdf
98 dvi: $(DVIDIR
) $(DVIDIR
)/Samba-HOWTO-Collection.
dvi $(DVIDIR
)/Samba-Developers-Guide.
dvi
100 ps
: $(PSDIR
) $(PSDIR
)/Samba-HOWTO-Collection.ps
$(PSDIR
)/Samba-Developers-Guide.ps
102 txt
: $(TXTDIR
) $(TXTDIR
)/Samba-HOWTO-Collection.txt
$(TXTDIR
)/Samba-Developers-Guide.txt
104 htmlman
: $(HTMLDIR
) $(MANPAGES_HTML
) $(HTMLDIR
)/samba.css
106 html-single
: $(HTMLDIR
) $(HTMLDIR
)/samba.css
$(HTMLDIR
)/Samba-HOWTO-Collection.html
$(HTMLDIR
)/Samba-Developers-Guide.html
$(HTMLDIR
)/Samba-Guide.html
107 cp
-p
$(GUIDEDOC_IMAGES_PNG
) $(HOWTODIR_IMAGES_PNG
) $(HTMLDIR
)/images
/
109 html
: $(HTMLDIR
)/howto
$(HTMLDIR
)/guide
$(HTMLDIR
)/devel
111 $(HTMLDIR
)/howto
: $(HTMLDIR
) $(HTMLDIR
)/howto
/samba.css Samba-HOWTO-Collection.xml
112 $(XSLTPROC
) --stringparam base.
dir "$(HTMLDIR)/howto/" xslt
/html-chunk.xsl Samba-HOWTO-Collection.xml
113 -mkdir
$(HTMLDIR
)/howto
/images
114 cp
-R
$(HOWTODIR_IMAGES_PNG
) $(HTMLDIR
)/howto
/images
116 $(HTMLDIR
)/devel
: $(HTMLDIR
) $(HTMLDIR
)/devel
/samba.css Samba-Developers-Guide.xml
117 $(XSLTPROC
) --stringparam base.
dir "$(HTMLDIR)/devel/" xslt
/html-chunk.xsl Samba-Developers-Guide.xml
119 $(HTMLDIR
)/guide
: $(HTMLDIR
) $(HTMLDIR
)/guide
/samba.css Samba-Guide.xml
120 $(XSLTPROC
) --stringparam base.
dir "$(HTMLDIR)/guide/" xslt
/html-chunk.xsl Samba-Guide.xml
121 -mkdir
$(HTMLDIR
)/guide
/images
122 cp
-R
$(GUIDEDOC_IMAGES_PNG
) $(HTMLDIR
)/guide
/images
124 manpages
: $(MANDIR
) $(MANPAGES
)
126 tex: Samba-HOWTO-Collection.
tex Samba-Developers-Guide.
tex gpl.
tex
128 plucker
: html-single htmlman
$(PLUCKERDIR
) $(MANPAGES_PLUCKER
) $(PLUCKERDIR
)/Samba-Developers-Guide.pdb
$(PLUCKERDIR
)/Samba-HOWTO-Collection.pdb
130 Samba-HOWTO-Collection.xml
: $(HOWTODIR
)/index.xml
$(HOWTODIR_DEPS
)
131 $(XSLTPROC
) --stringparam noreference
1 --xinclude
--output
$@ xslt
/expand-sambadoc.xsl
$<
133 Samba-Guide.xml
: $(GUIDEDOC
)/guide-main.xml
134 $(XSLTPROC
) --stringparam noreference
1 --xinclude
--output
$@ xslt
/expand-sambadoc.xsl
$<
136 Samba-Developers-Guide.xml
: $(DEVDOCDIR
)/index.xml
$(DEVDOCDIR_DEPS
)
137 $(XSLTPROC
) --stringparam noreference
1 --xinclude
--output
$@ xslt
/expand-sambadoc.xsl
$<
139 $(HOWTODIR
)/attributions.xml
: $(HOWTODIR
)/index.xml
140 @echo
> $@
# Make sure we don't get recursive dependencies, etc!
141 $(XSLTPROC
) --output
$@ xslt
/generate-attributions.xsl
$<
143 $(DEVDOCDIR
)/attributions.xml
: $(DEVDOCDIR
)/index.xml
144 @echo
> $@
# Make sure we don't get recursive dependencies, etc!
145 $(XSLTPROC
) --output
$@ xslt
/generate-attributions.xsl
$<
148 rm -rf
$(OUTPUTDIR
)/*
149 rm -f
*.xml
$(MANPAGES
) $(TXTDIR
)/*.txt
$(PSDIR
)/*.ps \
150 $(PDFDIR
)/*.pdf
$(HTMLDIR
)/*html
$(HTMLDIR
)/samba.css
151 rm -f xslt
/figures
/*pdf
152 rm -f
$(SMBDOTCONFDOC
)/parameters.
*.xml
$(DVIDIR
)/*.
dvi
153 rm -f samba-doc.
* index.
* $(HOWTODIR
)/changelog.xml
$(HOWTODIR
)/attributions.xml
$(DEVDOCDIR
)/attributions.xml
154 rm -f Samba-HOWTO-Collection.
*
155 rm -f Samba-Developers-Guide.
*
157 rm -f
$(IMAGEPROJDIR
)/*.eps
$(MANPAGEDIR
)/smb.conf
.5.xml
158 rm -f
$(PLUCKERDIR
)/*.pdb
164 $(TXTDIR
)/%.txt
: %.xml
165 $(XMLTO
) txt
-o
$(TXTDIR
) $< > $@
169 $(XSLTPROC
) --output
$@ xslt
/latex.xsl
$<
172 $(WGET
) http
://www.gnu.org
/licenses
/gpl.
tex
174 latexfigures
: $(LATEX_FIGURES
)
177 $(PDFDIR
)/%.pdf
: %.
tex latexfigures gpl.
tex
179 $(MAKEINDEX
) `echo $< | sed -e 's/.tex//'`
182 mv
$(patsubst %.
tex,%.pdf
,$<) $@
184 epsimages
: $(HOWTODIR_IMAGES_EPS
)
187 $(DVIDIR
)/%.
dvi: %.
tex epsimages gpl.
tex
189 $(MAKEINDEX
) `echo $< | sed -e 's/.tex//'`
192 mv
$(patsubst %.
tex,%.
dvi,$<) $@
195 $(PNGTOPNM
) $< |
$(PNMTOPS
) > $@
198 $(PSDIR
)/%.ps
: $(DVIDIR
)/%.
dvi
201 xslt
/figures
/%.pdf
: xslt
/figures
/%.eps
204 # Single large HTML files
208 mkdir
$(HTMLDIR
)/howto
209 mkdir
$(HTMLDIR
)/guide
210 mkdir
$(HTMLDIR
)/devel
211 mkdir
$(HTMLDIR
)/images
216 %/samba.css
: xslt
/html
/samba.css
219 $(HTMLDIR
)/Samba-HOWTO-Collection.html
: Samba-HOWTO-Collection.xml
$(HOWTODIR_DEPS
) $(HOWTODIR_IMAGES_PNG
)
220 $(XSLTPROC
) --output
$@ xslt
/html.xsl
$<
222 $(HTMLDIR
)/Samba-Guide.html
: Samba-Guide.xml
$(GUIDEDOC_IMAGES_PNG
)
223 $(XSLTPROC
) --output
$@ xslt
/html.xsl
$<
225 $(HTMLDIR
)/Samba-Developers-Guide.html
: Samba-Developers-Guide.xml
$(DEVDOCDIR_DEPS
)
226 $(XSLTPROC
) --output
$@ xslt
/html.xsl
$<
228 $(HTMLDIR
)/%.html
: %.xml
229 $(XSLTPROC
) --output
$@ xslt
/html.xsl
$<
231 $(PLUCKERDIR
)/%.pdb
: $(HTMLDIR
)/%.html
232 $(PLUCKERBUILD
) -v
-M1
--stayonhost
--noimages
--zlib-compression
-H file
:$< -f
$(patsubst $(PLUCKERDIR
)/%.pdb
,%,$@
) -p
$(PLUCKERDIR
)
234 %.xml
: $(MANPAGEDIR
)/%.xml
235 $(XSLTPROC
) --stringparam noreference
1 --output
$@ xslt
/expand-sambadoc.xsl
$<
238 $(SMBDOTCONFDOC
)/parameters.
all.xml
: $(SMBDOTCONFDOC
)/generate-file-list.sh
239 @cd
$(SMBDOTCONFDOC
) && \
240 /bin
/sh generate-file-list.sh
>parameters.
all.xml
&& \
243 $(SMBDOTCONFDOC
)/parameters.global.xml
: $(SMBDOTCONFDOC
)/parameters.
all.xml
$(SMBDOTCONFDOC
)/generate-context.xsl
244 @cd
$(SMBDOTCONFDOC
) && \
245 $(XSLTPROC
) --xinclude \
246 --param smb.context
"'G'" \
247 --output parameters.global.xml \
248 generate-context.xsl parameters.
all.xml
&& \
251 $(SMBDOTCONFDOC
)/parameters.service.xml
: $(SMBDOTCONFDOC
)/parameters.
all.xml
$(SMBDOTCONFDOC
)/generate-context.xsl
252 @cd
$(SMBDOTCONFDOC
) && \
253 $(XSLTPROC
) --xinclude \
254 --param smb.context
"'S'" \
255 --output parameters.service.xml \
256 generate-context.xsl parameters.
all.xml
&& \
259 smb.conf
.5.xml
: $(SMBDOTCONFDOC
)/smb.conf
.5.xml
$(SMBDOTCONFDOC
)/parameters.
all.xml \
260 $(SMBDOTCONFDOC
)/parameters.global.xml
$(SMBDOTCONFDOC
)/parameters.service.xml
261 $(XSLTPROC
) --stringparam noreference
1 --xinclude
--output
$@ xslt
/expand-sambadoc.xsl
$<
267 $(XSLTPROC
) --output
$@ xslt
/man.xsl
$<
269 # Find undocumented parameters
271 undocumented
: $(SMBDOTCONFDOC
)/parameters.
all.xml
272 $(PERL
) scripts
/find_missing_doc.pl ..
/..
274 # Examples and the like
279 files
: $(HOWTODIR
)/index.xml
$(HOWTODIR
)/attributions.xml
$(EXAMPLESDIR
)
280 $(XSLTPROC
) xslt
/extract-smbfiles.xsl
$< > /dev
/null
282 samples
: $(EXAMPLESDIR
) Samba-HOWTO-Collection.xml
283 $(XSLTPROC
) xslt
/extract-examples.xsl Samba-HOWTO-Collection.xml
> /dev
/null
2> examples
/README
284 for I in examples
/*.conf
; do
{ .
/scripts
/indent-smb.conf.pl
< $$I > $$I.tmp
; mv
$$I.tmp
$$I; } done
286 howto
: $(PDFDIR
)/Samba-HOWTO-Collection.pdf
287 guide
: $(PDFDIR
)/Samba-Guide.pdf
289 %/changelog.xml
: % $(wildcard %/CVS
/*)
296 archive
: $(ARCHIVEDIR
) guide howto
297 cp
$(PDFDIR
)/Samba-HOWTO-Collection.pdf
$(ARCHIVEDIR
)/TOSHARG-
`date +%Y%m%d`.pdf
298 cp
$(PDFDIR
)/Samba-Guide.pdf
$(ARCHIVEDIR
)/S3bE-
`date +%Y%m%d`.pdf