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
25 HTML2TXT=$(LINKS) -dump -width 72
28 HTML2TXT=$(LYNX) -dump -width=72 -nolist -stdin -force-html
35 ############### YOU SHOULDN'T HAVE TO EDIT ANYTHING BELOW THIS LINE! ################
37 include Makefile.common
39 # Automatically generate .pdf files from .fo files
40 # Suse needs FOP_OPTS, Debian needs JAVA_OPTS
43 FOP_OPTS=$(FOP_OPTS) JAVA_OPTS=$(FOP_OPTS) $(FOP) $< $@
51 ALL_TARGETS=svn_version_check wsug.validated wsdg.validated release_notes.validated wsug wsdg release_notes
53 ALL_TARGETS=svn_version_check wsug wsdg release_notes
56 # if we don't have XSLTPROC, there's nothing to do...
57 ALL_TARGETS=svn_version_check
63 # on every build, record the working copy revision string
65 # FORCE is the portable version of .PHONY
68 svn_version_check: FORCE
69 cat $(srcdir)/check_svn_version.sh | tr -d '\015' | /bin/bash
71 svn_version.xml: svn_version_check
73 # Wireshark User Guide
75 WSUG_TARGETS=wsug_html_chunked user-guide.html user-guide-a4.pdf user-guide-us.pdf
77 WSUG_TARGETS=wsug_html_chunked user-guide.html
82 # validate the content
83 wsug.validated: $(WSUG_SOURCE) wsluarm
84 @ echo --- WSUG - VALIDATING XML ---
85 $(XMLLINT) --valid --noout $<
88 # create html single page file
89 user-guide.html: wsug_html/user-guide.html
91 wsug_html/user-guide.html: $(WSUG_SOURCE) wsluarm
92 @ echo --- WSUG - HTML SINGLE PAGE ---
93 mkdir -p wsug_html/wsug_graphics/toolbar
94 cp $(srcdir)/wsug_graphics/*.* wsug_html/wsug_graphics
95 cp $(srcdir)/wsug_graphics/toolbar/* wsug_html/wsug_graphics/toolbar
96 cp $(srcdir)/ws.css wsug_html
97 $(XSLTPROC) --stringparam base.dir wsug_html/ --stringparam use.id.as.filename 1 \
98 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsug_graphics/ \
99 --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 \
100 --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< > $@
101 -chmod -R og+rX wsug_html
103 # create html chunked page files
104 wsug_html_chunked: wsug_html_chunked/index.html
106 wsug_html_chunked/index.html: $(WSUG_SOURCE) wsluarm
107 @ echo --- WSUG - HTML CHUNKED ---
108 mkdir -p wsug_html_chunked/wsug_graphics/toolbar
109 cp $(srcdir)/wsug_graphics/*.* wsug_html_chunked/wsug_graphics
110 cp $(srcdir)/wsug_graphics/toolbar/* wsug_html_chunked/wsug_graphics/toolbar
111 cp $(srcdir)/ws.css wsug_html_chunked
112 $(XSLTPROC) --stringparam base.dir wsug_html_chunked/ --stringparam use.id.as.filename 1 \
113 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsug_graphics/ \
114 --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 \
115 --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl $<
116 -chmod -R og+rX wsug_html_chunked
118 # create pdf file (through XSL-FO), portrait pages on US letter paper
119 # you will get lot's of errors, but that's ok
120 user-guide-us.fo: $(WSUG_SOURCE) custom_layer_pdf.xsl wsluarm
121 @ echo --- WSUG - PDF US PAPER ---
122 $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl $< > $@
124 # create pdf file (through XSL-FO), portrait pages on A4 paper
125 # you will get lot's of errors, but that's ok
126 user-guide-a4.fo: $(WSUG_SOURCE) custom_layer_pdf.xsl wsluarm
127 @ echo --- WSUG - PDF A4 PAPER ---
128 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl $< > $@
130 wsluarm: make-wsluarm.pl $(WSLUA_MODULES)
132 $(PERL) $(srcdir)/make-wsluarm.pl $(WSLUA_MODULES)
136 # Wireshark Developer Guide
138 WSDG_TARGETS=wsdg_html_chunked developer-guide.html developer-guide-a4.pdf developer-guide-us.pdf
140 WSDG_TARGETS=wsdg_html_chunked developer-guide.html
143 wsdg: $(WSDG_TARGETS)
145 # validate the content
146 wsdg.validated: $(WSDG_SOURCE)
147 @ echo --- WSDG - VALIDATING XML ---
148 $(XMLLINT) --valid --noout $<
151 # create html single page file
152 developer-guide.html: wsdg_html/developer-guide.html
154 wsdg_html/developer-guide.html: $(WSDG_SOURCE)
155 @ echo --- WSDG - HTML SINGLE PAGE ---
156 mkdir -p wsdg_html/wsdg_graphics
157 cp $(srcdir)/wsdg_graphics/* wsdg_html/wsdg_graphics
158 cp $(srcdir)/ws.css wsdg_html
159 $(XSLTPROC) --stringparam base.dir wsdg_html/ --stringparam use.id.as.filename 1 \
160 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsdg_graphics/ \
161 --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 \
162 --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< > $@
163 -chmod -R og+rX wsdg_html
165 # create html chunked page files
166 wsdg_html_chunked: wsdg_html_chunked/index.html
168 wsdg_html_chunked/index.html: $(WSDG_SOURCE)
169 @ echo --- WSDG - HTML CHUNKED ---
170 mkdir -p wsdg_html_chunked/wsdg_graphics
171 cp $(srcdir)/wsdg_graphics/* wsdg_html_chunked/wsdg_graphics
172 cp $(srcdir)/ws.css wsdg_html_chunked
173 $(XSLTPROC) --stringparam base.dir wsdg_html_chunked/ --stringparam use.id.as.filename 1 \
174 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsdg_graphics/ \
175 --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 \
176 --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl $<
177 -chmod -R og+rX wsdg_html_chunked
179 # create pdf file (through XSL-FO), portrait pages on US letter paper
180 # you will get lot's of errors, but that's ok
181 developer-guide-us.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
182 @ echo --- WSDG - PDF US PAPER ---
183 $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl $< > $@
185 # create pdf file (through XSL-FO), portrait pages on A4 paper
186 # you will get lot's of errors, but that's ok
187 developer-guide-a4.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
188 @ echo --- WSDG - PDF A4 PAPER ---
189 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl $< > $@
193 RELEASE_NOTES_TARGETS=release-notes.html release-notes.txt release-notes-a4.pdf release-notes-us.pdf
195 RELEASE_NOTES_TARGETS=release-notes.html release-notes.txt
198 release_notes: $(RELEASE_NOTES_TARGETS)
200 # validate the content
201 release_notes.validated: $(RELEASE_NOTES_SOURCE)
202 @ echo --- RELEASE NOTES - VALIDATING XML ---
203 $(XMLLINT) --valid --noout $<
206 # create html single page file
207 release-notes.html: $(RELEASE_NOTES_SOURCE)
208 @ echo --- RELEASE NOTES - HTML ---
209 $(XSLTPROC) --nonet http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl $< > $@
211 # create txt single page file (through HTML)
212 release-notes.txt: $(RELEASE_NOTES_SOURCE)
213 @ echo --- RELEASE NOTES - TXT ---
214 $(XSLTPROC) --stringparam generate.toc "article nop" --nonet http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl $< | $(HTML2TXT) > $@
216 news: release-notes.txt
217 cp release-notes.txt ../NEWS
219 # create pdf file (through XSL-FO), portrait pages on US letter paper
220 # you will get lot's of errors, but that's ok
221 release-notes-us.fo: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
222 @ echo --- RELEASE NOTES - PDF US PAPER ---
223 $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl $< > $@
225 # create pdf file (through XSL-FO), portrait pages on A4 paper
226 # you will get lot's of errors, but that's ok
227 release-notes-a4.fo: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
228 @ echo --- RELEASE NOTES - PDF A4 PAPER ---
229 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl $< > $@
234 # XXX if we actually use automake to build this stuff, most of this shouldn't
236 EXTRA_DIST=$(WSUG_SOURCE) $(WSDG_SOURCE) $(RELEASE_NOTES_SOURCE) \
237 check_svn_version.sh make-wsluarm.pl Makefile.nmake
239 MAINTAINERCLEANFILES = \