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'
14 # fop executable is found in configure.in .
15 # XXX - have it check for the right version (0.20.5 or newer)?
17 # html to text converter for text version of release notes, e.g. elinks.
18 # This could also be "lynx", or "true" if neither elinks nor lynx is installed
19 # (See Bug # 1446 for note re 'force-html' below)
20 # Sorry about the indenting, but that's what automake requires...
22 HTML2TXT=$(ELINKS) -dump -dump-width 72
23 ## links: -dump requires 'url' argument (as opposed to elinks & lynx)
24 ## (Rather than fixing things we'll just disable the use of links).
27 ##HTML2TXT=$(LINKS) -dump -width 72
30 HTML2TXT=$(LYNX) -dump -width=72 -nolist -stdin -force-html
37 ############### YOU SHOULDN'T HAVE TO EDIT ANYTHING BELOW THIS LINE! ################
39 include Makefile.common
41 # Automatically generate .pdf files from .fo files
42 # Suse needs FOP_OPTS, Debian needs JAVA_OPTS
45 FOP_OPTS=$(FOP_OPTS) JAVA_OPTS=$(FOP_OPTS) $(FOP) $< $@
52 ALL_TARGETS=svn_version_check wsug wsdg release_notes
54 # if we don't have XSLTPROC, there's nothing to do...
55 ALL_TARGETS=svn_version_check
61 # on every build, record the working copy revision string
63 # FORCE is the portable version of .PHONY
66 svn_version_check: FORCE
67 cat $(srcdir)/check_svn_version.sh | tr -d '\015' | /bin/bash
69 svn_version.xml: svn_version_check
71 # Wireshark User Guide
73 WSUG_TARGETS=wsug.validated wsug_html_chunked user-guide.html user-guide-a4.pdf user-guide-us.pdf
75 WSUG_TARGETS=wsug.validated wsug_html_chunked user-guide.html
80 # validate the content
81 wsug.validated: $(WSUG_SOURCE) wsluarm
83 @ echo --- WSUG - VALIDATING XML ---
84 $(XMLLINT) --valid --noout $<
87 @ echo --- WSUG - SKIP VALIDATION ---
90 # create html single page file
91 user-guide.html: wsug_html/user-guide.html
93 wsug_html/user-guide.html: $(WSUG_SOURCE) wsluarm
94 @ echo --- WSUG - HTML SINGLE PAGE ---
95 mkdir -p wsug_html/wsug_graphics/toolbar
96 cp $(srcdir)/wsug_graphics/*.* wsug_html/wsug_graphics
97 cp $(srcdir)/wsug_graphics/toolbar/* wsug_html/wsug_graphics/toolbar
98 cp $(srcdir)/ws.css wsug_html
99 $(XSLTPROC) --stringparam base.dir wsug_html/ --stringparam use.id.as.filename 1 \
100 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsug_graphics/ \
101 --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 \
102 --stringparam html.stylesheet ws.css \
103 --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< > $@
104 -chmod -R og+rX wsug_html
106 # create html chunked page files
107 wsug_html_chunked: wsug_html_chunked/index.html
109 wsug_html_chunked/index.html: $(WSUG_SOURCE) wsluarm
110 @ echo --- WSUG - HTML CHUNKED ---
111 mkdir -p wsug_html_chunked/wsug_graphics/toolbar
112 cp $(srcdir)/wsug_graphics/*.* wsug_html_chunked/wsug_graphics
113 cp $(srcdir)/wsug_graphics/toolbar/* wsug_html_chunked/wsug_graphics/toolbar
114 cp $(srcdir)/ws.css wsug_html_chunked
115 $(XSLTPROC) --stringparam base.dir wsug_html_chunked/ --stringparam use.id.as.filename 1 \
116 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsug_graphics/ \
117 --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 \
118 --stringparam html.stylesheet ws.css \
119 --nonet http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl $<
120 -chmod -R og+rX wsug_html_chunked
122 # create pdf file (through XSL-FO), portrait pages on US letter paper
123 # you will get lot's of errors, but that's ok
124 user-guide-us.fo: $(WSUG_SOURCE) custom_layer_pdf.xsl wsluarm
125 @ echo --- WSUG - PDF US PAPER ---
126 $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl $< > $@
128 # create pdf file (through XSL-FO), portrait pages on A4 paper
129 # you will get lot's of errors, but that's ok
130 user-guide-a4.fo: $(WSUG_SOURCE) custom_layer_pdf.xsl wsluarm
131 @ echo --- WSUG - PDF A4 PAPER ---
132 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl $< > $@
134 wsluarm: make-wsluarm.pl $(WSLUA_MODULES)
136 $(PERL) $(srcdir)/make-wsluarm.pl $(WSLUA_MODULES)
140 # Wireshark Developer Guide
142 WSDG_TARGETS=wsdg.validated wsdg_html_chunked developer-guide.html developer-guide-a4.pdf developer-guide-us.pdf
144 WSDG_TARGETS=wsdg.validated wsdg_html_chunked developer-guide.html
147 wsdg: $(WSDG_TARGETS)
149 # validate the content
150 wsdg.validated: $(WSDG_SOURCE)
152 @ echo --- WSDG - VALIDATING XML ---
153 $(XMLLINT) --valid --noout $<
156 @ echo --- WSDG - SKIP VALIDATION ---
159 # create html single page file
160 developer-guide.html: wsdg_html/developer-guide.html
162 wsdg_html/developer-guide.html: $(WSDG_SOURCE)
163 @ echo --- WSDG - HTML SINGLE PAGE ---
164 mkdir -p wsdg_html/wsdg_graphics/toolbar
165 cp $(srcdir)/wsdg_graphics/*.* wsdg_html/wsdg_graphics
166 cp wsug_graphics/toolbar/* wsug_html/wsug_graphics/toolbar/
167 cp $(srcdir)/ws.css wsdg_html
168 $(XSLTPROC) --stringparam base.dir wsdg_html/ --stringparam use.id.as.filename 1 \
169 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsdg_graphics/ \
170 --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 \
171 --stringparam html.stylesheet ws.css \
172 --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< > $@
173 -chmod -R og+rX wsdg_html
175 # create html chunked page files
176 wsdg_html_chunked: wsdg_html_chunked/index.html
178 wsdg_html_chunked/index.html: $(WSDG_SOURCE)
179 @ echo --- WSDG - HTML CHUNKED ---
180 mkdir -p wsdg_html_chunked/wsdg_graphics/toolbar
181 cp $(srcdir)/wsdg_graphics/*.* wsdg_html_chunked/wsdg_graphics
182 cp wsug_graphics/toolbar/* wsug_html_chunked/wsug_graphics/toolbar/
183 cp $(srcdir)/ws.css wsdg_html_chunked
184 $(XSLTPROC) --stringparam base.dir wsdg_html_chunked/ --stringparam use.id.as.filename 1 \
185 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsdg_graphics/ \
186 --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 \
187 --stringparam html.stylesheet ws.css \
188 --nonet http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl $<
189 -chmod -R og+rX wsdg_html_chunked
191 # create pdf file (through XSL-FO), portrait pages on US letter paper
192 # you will get lot's of errors, but that's ok
193 developer-guide-us.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
194 @ echo --- WSDG - PDF US PAPER ---
195 $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl $< > $@
197 # create pdf file (through XSL-FO), portrait pages on A4 paper
198 # you will get lot's of errors, but that's ok
199 developer-guide-a4.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
200 @ echo --- WSDG - PDF A4 PAPER ---
201 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl $< > $@
205 RELEASE_NOTES_TARGETS=release_notes.validated release-notes.html release-notes.txt release-notes-a4.pdf release-notes-us.pdf
207 RELEASE_NOTES_TARGETS=release_notes.validated release-notes.html release-notes.txt
210 release_notes: $(RELEASE_NOTES_TARGETS)
212 # validate the content
213 release_notes.validated: $(RELEASE_NOTES_SOURCE)
215 @ echo --- RELEASE NOTES - VALIDATING XML ---
216 $(XMLLINT) --valid --noout $<
219 @ echo --- RELEASE NOTES - SKIP VALIDATION ---
222 # create html single page file
223 release-notes.html: $(RELEASE_NOTES_SOURCE)
224 @ echo --- RELEASE NOTES - HTML ---
225 $(XSLTPROC) --nonet http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl $< > $@
227 # create txt single page file (through HTML)
228 release-notes.txt: $(RELEASE_NOTES_SOURCE)
229 @ echo --- RELEASE NOTES - TXT ---
230 $(XSLTPROC) --stringparam generate.toc "article nop" \
231 --nonet http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl $< | $(HTML2TXT) > $@
233 news: release-notes.txt
234 cp release-notes.txt ../NEWS
236 # create pdf file (through XSL-FO), portrait pages on US letter paper
237 # you will get lot's of errors, but that's ok
238 release-notes-us.fo: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
239 @ echo --- RELEASE NOTES - PDF US PAPER ---
240 $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl $< > $@
242 # create pdf file (through XSL-FO), portrait pages on A4 paper
243 # you will get lot's of errors, but that's ok
244 release-notes-a4.fo: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
245 @ echo --- RELEASE NOTES - PDF A4 PAPER ---
246 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl $< > $@
254 $(RELEASE_NOTES_SOURCE) \
255 check_svn_version.sh \
263 MAINTAINERCLEANFILES = \