2 # Make the "Wireshark User Guide" and "Wireshark Developer Guide"
4 # See the Readme.txt file for instructions.
9 # formatting objects processor
10 # Additional options to fop.
11 # This needs to contain at least the argument '-Xmx256m'
12 # fop executable is found in configure.ac.
16 A2X_HTML_OPTS="--stylesheet=ws.css"
20 A2X_TEXT_OPTS+="--lynx"
23 # html to text converter for text version of release notes, e.g. elinks.
24 # This could also be "lynx", or "true" if neither elinks nor lynx is installed
25 # (See Bug # 1446 for note re 'force-html' below)
26 # Sorry about the indenting, but that's what automake requires...
28 HTML2TXT=$(ELINKS) -dump -dump-width 72
29 ## links: -dump requires 'url' argument (as opposed to elinks & lynx)
30 ## (Rather than fixing things we'll just disable the use of links).
33 ##HTML2TXT=$(LINKS) -dump -width 72
36 HTML2TXT=$(LYNX) -dump -width=72 -nolist -stdin -force-html
43 ############### YOU SHOULDN'T HAVE TO EDIT ANYTHING BELOW THIS LINE! ################
45 include Makefile.common
47 # Automatically generate .pdf files from .fo files
48 # Suse needs FOP_OPTS, Debian needs JAVA_OPTS
51 FOP_OPTS=$(FOP_OPTS) JAVA_OPTS=$(FOP_OPTS) $(FOP) $< $@
54 @echo "Error: FOP is needed to create PDFs!"
60 ALL_TARGETS=svn_version_check wsug wsdg release_notes
62 # if we don't have XSLTPROC, there's nothing to do...
63 ALL_TARGETS=svn_version_check
69 # on every build, record the working copy revision string
71 # FORCE is the portable version of .PHONY
74 svn_version_check: FORCE
75 cat $(srcdir)/check_svn_version.sh | tr -d '\015' | /bin/bash
77 svn_version.xml: svn_version_check
79 # Wireshark User Guide
81 WSUG_TARGETS=wsug.validated wsug_html_chunked wsug_html user-guide-a4.pdf user-guide-us.pdf
83 WSUG_TARGETS=wsug.validated wsug_html_chunked wsug_html
88 # validate the content
89 wsug.validated: $(WSUG_SOURCE) wsluarm
91 @ echo --- WSUG - VALIDATING XML ---
92 $(XMLLINT) --valid --noout $<
95 @ echo --- WSUG - SKIP VALIDATION ---
98 # create html single page file
99 wsug_html: wsug_html/index.html
101 wsug_html/index.html: $(WSUG_SOURCE) wsluarm
102 @ echo --- WSUG - HTML SINGLE PAGE ---
103 mkdir -p wsug_html/wsug_graphics/toolbar
104 cp $(srcdir)/wsug_graphics/*.* wsug_html/wsug_graphics
105 cp $(srcdir)/wsug_graphics/toolbar/* wsug_html/wsug_graphics/toolbar
106 cp $(srcdir)/ws.css wsug_html
107 $(XSLTPROC) --stringparam base.dir wsug_html/ --stringparam use.id.as.filename 1 \
108 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsug_graphics/ \
109 --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 \
110 --stringparam html.stylesheet ws.css \
111 --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< > $@
112 -chmod -R og+rX wsug_html
114 # create html chunked page files
115 wsug_html_chunked: wsug_html_chunked/index.html
117 wsug_html_chunked/index.html: $(WSUG_SOURCE) wsluarm
118 @ echo --- WSUG - HTML CHUNKED ---
119 mkdir -p wsug_html_chunked/wsug_graphics/toolbar
120 cp $(srcdir)/wsug_graphics/*.* wsug_html_chunked/wsug_graphics
121 cp $(srcdir)/wsug_graphics/toolbar/* wsug_html_chunked/wsug_graphics/toolbar
122 cp $(srcdir)/ws.css wsug_html_chunked
123 $(XSLTPROC) --stringparam base.dir wsug_html_chunked/ --stringparam use.id.as.filename 1 \
124 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsug_graphics/ \
125 --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 \
126 --stringparam html.stylesheet ws.css \
127 --nonet http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl $<
128 -chmod -R og+rX wsug_html_chunked
130 # create pdf file (through XSL-FO), portrait pages on US letter paper
131 # you will get lot's of errors, but that's ok
132 user-guide-us.fo: $(WSUG_SOURCE) custom_layer_pdf.xsl wsluarm
133 @ echo --- WSUG - PDF US PAPER ---
134 $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl $< > $@
136 # create pdf file (through XSL-FO), portrait pages on A4 paper
137 # you will get lot's of errors, but that's ok
138 user-guide-a4.fo: $(WSUG_SOURCE) custom_layer_pdf.xsl wsluarm
139 @ echo --- WSUG - PDF A4 PAPER ---
140 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl $< > $@
142 wsluarm: make-wsluarm.pl $(WSLUA_MODULES)
144 $(PERL) $(srcdir)/make-wsluarm.pl $(WSLUA_MODULES)
148 # Wireshark Developer Guide
150 WSDG_TARGETS=wsdg.validated wsdg_html_chunked wsdg_html developer-guide-a4.pdf developer-guide-us.pdf
152 WSDG_TARGETS=wsdg.validated wsdg_html_chunked wsdg_html
155 wsdg: $(WSDG_TARGETS)
157 # validate the content
158 wsdg.validated: $(WSDG_SOURCE)
160 @ echo --- WSDG - VALIDATING XML ---
161 $(XMLLINT) --valid --noout $<
164 @ echo --- WSDG - SKIP VALIDATION ---
167 # create html single page file
168 wsdg_html: wsdg_html/index.html
170 wsdg_html/index.html: $(WSDG_SOURCE)
171 @ echo --- WSDG - HTML SINGLE PAGE ---
172 mkdir -p wsdg_html/wsdg_graphics/toolbar
173 cp $(srcdir)/wsdg_graphics/*.* wsdg_html/wsdg_graphics
174 cp wsdg_graphics/toolbar/* wsdg_html/wsdg_graphics/toolbar/
175 cp $(srcdir)/ws.css wsdg_html
176 $(XSLTPROC) --stringparam base.dir wsdg_html/ --stringparam use.id.as.filename 1 \
177 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsdg_graphics/ \
178 --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 \
179 --stringparam html.stylesheet ws.css \
180 --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< > $@
181 -chmod -R og+rX wsdg_html
183 # create html chunked page files
184 wsdg_html_chunked: wsdg_html_chunked/index.html
186 wsdg_html_chunked/index.html: $(WSDG_SOURCE)
187 @ echo --- WSDG - HTML CHUNKED ---
188 mkdir -p wsdg_html_chunked/wsdg_graphics/toolbar
189 cp $(srcdir)/wsdg_graphics/*.* wsdg_html_chunked/wsdg_graphics
190 cp wsdg_graphics/toolbar/* wsdg_html_chunked/wsdg_graphics/toolbar/
191 cp $(srcdir)/ws.css wsdg_html_chunked
192 $(XSLTPROC) --stringparam base.dir wsdg_html_chunked/ --stringparam use.id.as.filename 1 \
193 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsdg_graphics/ \
194 --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 \
195 --stringparam html.stylesheet ws.css \
196 --nonet http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl $<
197 -chmod -R og+rX wsdg_html_chunked
199 # create pdf file (through XSL-FO), portrait pages on US letter paper
200 # you will get lot's of errors, but that's ok
201 developer-guide-us.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
202 @ echo --- WSDG - PDF US PAPER ---
203 $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl $< > $@
205 # create pdf file (through XSL-FO), portrait pages on A4 paper
206 # you will get lot's of errors, but that's ok
207 developer-guide-a4.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
208 @ echo --- WSDG - PDF A4 PAPER ---
209 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl $< > $@
213 RELEASE_NOTES_TARGETS=release-notes.html release-notes.txt release-notes-a4.pdf release-notes-us.pdf
215 RELEASE_NOTES_TARGETS=release-notes.html release-notes.txt
218 release_notes: $(RELEASE_NOTES_TARGETS)
220 # create html single page file
221 release-notes.html: $(RELEASE_NOTES_SOURCE)
222 @ echo --- RELEASE NOTES - HTML ---
223 $(A2X) --format=xhtml $(A2X_HTML_OPTS) release-notes.asciidoc
225 # create txt single page file (through HTML)
226 release-notes.txt: $(RELEASE_NOTES_SOURCE)
227 @ echo --- RELEASE NOTES - TXT ---
228 $(A2X) --format=text $(A2X_TEXT_OPTS) \
229 --xsltproc-opts "--stringparam generate.toc \"article nop\"" \
230 release-notes.asciidoc
231 mv release-notes.text $@
233 news: release-notes.txt
234 cp release-notes.txt ../NEWS
236 # create pdf file, portrait pages on US letter paper
237 release-notes-us.pdf: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
238 @ echo --- RELEASE NOTES - PDF US LETTER PAPER ---
239 $(A2X) --format=pdf $(A2X_HTML_OPTS) --fop \
240 --xsltproc-opts "--stringparam paper.type letter --nonet" \
241 --xsl-file=custom_layer_pdf.xsl \
242 release-notes.asciidoc
243 mv release-notes.pdf $@
245 # create pdf file, portrait pages on A4 paper
246 release-notes-a4.pdf: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
247 @ echo --- RELEASE NOTES - PDF A4 PAPER ---
248 $(A2X) --format=pdf $(A2X_HTML_OPTS) --fop \
249 --xsltproc-opts "--stringparam paper.type A4 --nonet" \
250 --xsl-file=custom_layer_pdf.xsl \
251 release-notes.asciidoc
252 mv release-notes.pdf $@
260 $(RELEASE_NOTES_SOURCE) \
261 check_svn_version.sh \
269 MAINTAINERCLEANFILES = \