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 MAKEINDEX
= @MAKEINDEX@
42 IMAGEPROJDIR
= $(HOWTODIR
)/imagefiles
43 GUIDEDOC
= $(TOPDIR
)/guide
44 EXAMPLESDIR
= $(TOPDIR
)/examples
45 DEVDOCDIR
= $(TOPDIR
)/devel
46 SMBDOTCONFDOC
= $(TOPDIR
)/smbdotconf
50 TXTDIR
= $(OUTPUTDIR
)/textdocs
51 HTMLDIR
=$(OUTPUTDIR
)/htmldocs
52 PLUCKERDIR
=$(OUTPUTDIR
)/plucker
54 # Lists of files to process
55 LATEX_FIGURES
= xslt
/figures
/caution.pdf xslt
/figures
/important.pdf xslt
/figures
/note.pdf xslt
/figures
/tip.pdf xslt
/figures
/warning.pdf
56 MANPAGES_SOURCES
= $(wildcard $(MANPAGEDIR
)/*.?.xml
)
57 MANPAGES
= $(patsubst $(MANPAGEDIR
)/%.xml
,$(MANDIR
)/%,$(MANPAGES_SOURCES
)) $(MANDIR
)/smb.conf
.5
58 MANPAGES_HTML
= $(patsubst $(MANPAGEDIR
)/%.xml
,$(HTMLDIR
)/%.html
,$(MANPAGES_SOURCES
)) $(HTMLDIR
)/smb.conf
.5.html
59 MANPAGES_PLUCKER
= $(patsubst $(MANPAGEDIR
)/%.xml
,$(PLUCKERDIR
)/%.pdb
,$(MANPAGES_SOURCES
)) $(PLUCKERDIR
)/smb.conf
.5.pdb
61 HOWTODIR_IMAGES_PNG
= $(wildcard $(IMAGEPROJDIR
)/*.png
)
62 HOWTODIR_IMAGES_EPS
=$(patsubst %.png
,%.eps
,$(wildcard $(IMAGEPROJDIR
)/*.png
))
63 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
64 DEVDOCDIR_DEPS
= $(DEVDOCDIR
)/*.xml
$(DEVDOCDIR
)/attributions.xml
67 @echo
"Supported make targets:"
68 @echo
"release - Build the docs needed for a Samba release"
69 @echo
"pdf - Build PDF version of book"
70 @echo
"tex - Build Latex version of book"
71 @echo
"dvi - Build Device Independant File of book"
72 @echo
"ps - Build PostScript version of book"
73 @echo
"manpages - Build manpages"
74 @echo
"txt - Build plain text version of HOWTO Collection and Developers Guide"
75 @echo
-n
"html-single - Build single file HTML version of HOWTO Collection"
76 @echo
" and developers guide"
77 @echo
"html - Build HTML version of HOWTO Collection and Developers Guide"
78 @echo
"htmlman - Build html version of manpages"
79 @echo
"plucker - Build HOWTO, Developers Guide, man pages in Plucker format for PDA"
80 @echo
"undocumented - Output list of undocumented smb.conf options"
81 @echo
"samples - Extract examples"
82 @echo
"files - Extract other files"
83 @echo
"everything - Build all of the above"
85 everything
: manpages pdf html-single html htmlman txt ps
87 release
: manpages htmlman html html-single pdf guide
91 pdf
: $(PDFDIR
) $(PDFDIR
)/Samba-HOWTO-Collection.pdf
$(PDFDIR
)/Samba-Developers-Guide.pdf
93 dvi: $(DVIDIR
) $(DVIDIR
)/Samba-HOWTO-Collection.
dvi $(DVIDIR
)/Samba-Developers-Guide.
dvi
95 ps
: $(PSDIR
) $(PSDIR
)/Samba-HOWTO-Collection.ps
$(PSDIR
)/Samba-Developers-Guide.ps
97 txt
: $(TXTDIR
) $(TXTDIR
)/Samba-HOWTO-Collection.txt
$(TXTDIR
)/Samba-Developers-Guide.txt
99 htmlman
: $(HTMLDIR
) $(MANPAGES_HTML
) CSS
101 html-single
: $(HTMLDIR
) CSS
$(HTMLDIR
)/Samba-HOWTO-Collection.html
$(HTMLDIR
)/Samba-Developers-Guide.html
102 @if
[ ! -d
$(HTMLDIR
)/images
/ ]; then \
103 mkdir
$(HTMLDIR
)/images
/; \
105 && cp
-p
$(HOWTODIR
)/imagefiles
/*png
$(HTMLDIR
)/images
/
107 html
: $(HTMLDIR
) CSS Samba-HOWTO-Collection.xml
$(HTMLDIR
)/Samba-Developers-Guide.html
108 $(XSLTPROC
) -o
"$(HTMLDIR)/" xslt
/html-chunk.xsl Samba-HOWTO-Collection.xml
109 @if
[ ! -d
$(HTMLDIR
)/images
/ ]; then \
110 mkdir
$(HTMLDIR
)/images
/; \
112 && cp
-p
$(HOWTODIR
)/imagefiles
/*png
$(HTMLDIR
)/images
/
114 manpages
: $(MANDIR
) $(MANPAGES
)
116 tex: Samba-HOWTO-Collection.
tex Samba-Developers-Guide.
tex gpl.
tex
118 plucker
: html-single htmlman
$(PLUCKERDIR
) $(MANPAGES_PLUCKER
) $(PLUCKERDIR
)/Samba-Developers-Guide.pdb
$(PLUCKERDIR
)/Samba-HOWTO-Collection.pdb
120 Samba-HOWTO-Collection.xml
: $(HOWTODIR
)/index.xml
$(HOWTODIR_DEPS
)
121 $(XSLTPROC
) --stringparam noreference
1 --xinclude
--output
$@ xslt
/expand-sambadoc.xsl
$<
123 Samba-Guide.xml
: $(GUIDEDOC
)/guide-main.xml
124 $(XSLTPROC
) --stringparam noreference
1 --xinclude
--output
$@ xslt
/expand-sambadoc.xsl
$<
126 Samba-Developers-Guide.xml
: $(DEVDOCDIR
)/index.xml
$(DEVDOCDIR_DEPS
)
127 $(XSLTPROC
) --stringparam noreference
1 --xinclude
--output
$@ xslt
/expand-sambadoc.xsl
$<
129 $(HOWTODIR
)/attributions.xml
: $(HOWTODIR
)/index.xml
130 @echo
> $@
# Make sure we don't get recursive dependencies, etc!
131 $(XSLTPROC
) --output
$@ xslt
/generate-attributions.xsl
$<
133 $(DEVDOCDIR
)/attributions.xml
: $(DEVDOCDIR
)/index.xml
134 @echo
> $@
# Make sure we don't get recursive dependencies, etc!
135 $(XSLTPROC
) --output
$@ xslt
/generate-attributions.xsl
$<
138 rm -f
*.xml
$(MANPAGES
) $(TXTDIR
)/*.txt
$(PSDIR
)/*.ps \
139 $(PDFDIR
)/*.pdf
$(HTMLDIR
)/*html
$(HTMLDIR
)/samba.css
140 rm -f xslt
/figures
/*pdf
141 rm -f
$(SMBDOTCONFDOC
)/parameters.
*.xml
$(DVIDIR
)/*.
dvi
142 rm -f samba-doc.
* index.
* $(HOWTODIR
)/changelog.xml
$(HOWTODIR
)/attributions.xml
$(DEVDOCDIR
)/attributions.xml
143 rm -f Samba-HOWTO-Collection.
*
144 rm -f Samba-Developers-Guide.
*
146 rm -f
$(IMAGEPROJDIR
)/*.eps
$(MANPAGEDIR
)/smb.conf
.5.xml
147 rm -f
$(PLUCKERDIR
)/*.pdb
153 $(TXTDIR
)/%.txt
: %.xml
154 $(XMLTO
) txt
-o
$(TXTDIR
) $< > $@
158 $(XSLTPROC
) --output
$@ xslt
/latex.xsl
$<
161 $(WGET
) http
://www.gnu.org
/licenses
/gpl.
tex
163 latexfigures
: $(LATEX_FIGURES
)
166 $(PDFDIR
)/%.pdf
: %.
tex latexfigures gpl.
tex
168 $(MAKEINDEX
) `echo $< | sed -e 's/.tex//'`
171 mv
$(patsubst %.
tex,%.pdf
,$<) $@
173 epsimages
: $(HOWTODIR_IMAGES_EPS
)
176 $(DVIDIR
)/%.
dvi: %.
tex epsimages gpl.
tex
178 $(MAKEINDEX
) `echo $< | sed -e 's/.tex//'`
181 mv
$(patsubst %.
tex,%.
dvi,$<) $@
184 $(PNGTOPNM
) $< |
$(PNMTOPS
) > $@
187 $(PSDIR
)/%.ps
: $(DVIDIR
)/%.
dvi
190 xslt
/figures
/%.pdf
: xslt
/figures
/%.eps
193 # Single large HTML files
197 mkdir
$(HTMLDIR
)/images
202 CSS
: $(HTMLDIR
) xslt
/html
/samba.css
203 cp xslt
/html
/samba.css
$(HTMLDIR
)/
205 $(HTMLDIR
)/Samba-HOWTO-Collection.html
: Samba-HOWTO-Collection.xml
$(HOWTODIR_DEPS
) $(HOWTODIR_IMAGES_PNG
)
206 $(XSLTPROC
) --output
$@ xslt
/html.xsl
$<
208 $(HTMLDIR
)/Samba-Developers-Guide.html
: Samba-Developers-Guide.xml
$(DEVDOCDIR_DEPS
)
209 $(XSLTPROC
) --output
$@ xslt
/html.xsl
$<
211 $(HTMLDIR
)/%.html
: %.xml
212 $(XSLTPROC
) --output
$@ xslt
/html.xsl
$<
214 $(PLUCKERDIR
)/%.pdb
: $(HTMLDIR
)/%.html
215 $(PLUCKERBUILD
) -v
-M1
--stayonhost
--noimages
--zlib-compression
-H file
:$< -f
$(patsubst $(PLUCKERDIR
)/%.pdb
,%,$@
) -p
$(PLUCKERDIR
)
217 %.xml
: $(MANPAGEDIR
)/%.xml
218 $(XSLTPROC
) --stringparam noreference
1 --output
$@ xslt
/expand-sambadoc.xsl
$<
221 $(SMBDOTCONFDOC
)/parameters.
all.xml
: $(SMBDOTCONFDOC
)/generate-file-list.sh
222 @cd
$(SMBDOTCONFDOC
) && \
223 /bin
/sh generate-file-list.sh
>parameters.
all.xml
&& \
226 $(SMBDOTCONFDOC
)/parameters.global.xml
: $(SMBDOTCONFDOC
)/parameters.
all.xml
$(SMBDOTCONFDOC
)/generate-context.xsl
227 @cd
$(SMBDOTCONFDOC
) && \
228 $(XSLTPROC
) --xinclude \
229 --param smb.context
"'G'" \
230 --output parameters.global.xml \
231 generate-context.xsl parameters.
all.xml
&& \
234 $(SMBDOTCONFDOC
)/parameters.service.xml
: $(SMBDOTCONFDOC
)/parameters.
all.xml
$(SMBDOTCONFDOC
)/generate-context.xsl
235 @cd
$(SMBDOTCONFDOC
) && \
236 $(XSLTPROC
) --xinclude \
237 --param smb.context
"'S'" \
238 --output parameters.service.xml \
239 generate-context.xsl parameters.
all.xml
&& \
242 smb.conf
.5.xml
: $(SMBDOTCONFDOC
)/smb.conf
.5.xml
$(SMBDOTCONFDOC
)/parameters.
all.xml \
243 $(SMBDOTCONFDOC
)/parameters.global.xml
$(SMBDOTCONFDOC
)/parameters.service.xml
244 $(XSLTPROC
) --stringparam noreference
1 --xinclude
--output
$@ xslt
/expand-sambadoc.xsl
$<
250 $(XSLTPROC
) --output
$@ xslt
/man.xsl
$<
252 # Find undocumented parameters
254 undocumented
: $(SMBDOTCONFDOC
)/parameters.
all.xml
255 $(PERL
) scripts
/find_missing_doc.pl ..
/..
257 # Examples and the like
262 files
: $(HOWTODIR
)/index.xml
$(HOWTODIR
)/attributions.xml
$(EXAMPLESDIR
)
263 $(XSLTPROC
) xslt
/extract-smbfiles.xsl
$< > /dev
/null
265 samples
: $(EXAMPLESDIR
) Samba-HOWTO-Collection.xml
266 $(XSLTPROC
) xslt
/extract-examples.xsl Samba-HOWTO-Collection.xml
> /dev
/null
2> examples
/README
267 for I in examples
/*.conf
; do
{ .
/scripts
/indent-smb.conf.pl
< $$I > $$I.tmp
; mv
$$I.tmp
$$I; } done
269 howto
: $(PDFDIR
)/Samba-HOWTO-Collection.pdf
270 guide
: $(PDFDIR
)/Samba-Guide.pdf
272 %/changelog.xml
: % $(wildcard %/CVS
/*)
279 archive
: $(ARCHIVEDIR
) guide howto
280 cp
$(PDFDIR
)/Samba-HOWTO-Collection.pdf
$(ARCHIVEDIR
)/TOSHARG-
`date +%Y%m%d`.pdf
281 cp
$(PDFDIR
)/Samba-Guide.pdf
$(ARCHIVEDIR
)/S3bE-
`date +%Y%m%d`.pdf