2 # Make the "Wireshark User Guide" and "Wireshark Developer Guide"
4 # See the Readme.txt file for instructions.
6 ## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
11 # formatting objects processor
12 # Additional options to fop.
13 # This needs to contain at least the argument '-Xmx256m'
17 # Leave these commented out if you don't have fop instlled or you
18 # don't want PDF documentation.
20 # for win32 (cygwin) environments (as of fop-0.20 the cygwin script does
23 FOP=fop-0.20.5\fop.bat
26 # for unix like environments (if you have problems with fop, try to use an absolute path here)
27 #FOP=fop-0.20.5/fop.sh
29 # One SUSE 9.1 and newer uncomment the following line (make sure you have
30 # at least fop-0.20.5-71.2)
33 # html help compiler (Win32 only)
34 # Leave these commented out if you don't have HHC installed or you
35 # don't want CHM documentation.
36 HHC="C:\Program Files\HTML Help Workshop\hhc.exe"
39 # html to text converter for text version of release notes, e.g. elinks.
40 # This could also be "lynx", or "true" if neither elinks nor lynx is installed
41 # (cygwin: lynx works, elinks not available, links and true doesn't produce output)
42 #HTML2TXT=elinks -dump -dump-width 72
43 #HTML2TXT=links -dump -width 72
44 HTML2TXT=lynx -dump -width=72 -nolist -stdin
47 ############### YOU SHOULDN'T HAVE TO EDIT ANYTHING BELOW THIS LINE! ################
49 include ..\config.nmake
50 include Makefile.common
55 # the XML validator (from the xsltproc package)
58 # Automatically generate .pdf files from .fo files
59 # Suse needs FOP_OPTS, Debian needs JAVA_OPTS
63 # FOP_OPTS="$(FOP_OPTS) $(JAVA_OPTS)" $(FOP) $< $@
66 all: svn_version_check wsug.validated wsdg.validated release_notes.validated wsug wsdg release_notes
74 # on every build, record the working copy revision string
76 # FORCE is the portable version of .PHONY
79 svn_version_check: FORCE
80 @ $(SH) ./check_svn_version.sh
82 svn_version.xml: svn_version_check
85 wsug: wsug_html_chunked user-guide.html user-guide-a4.pdf user-guide-us.pdf user-guide.chm user-guide.zip
87 # validate the content
88 wsug.validated: $(WSUG_SOURCE)
89 @ echo --- WSUG - VALIDATING XML ---
90 $(XMLLINT) --valid --noout user-guide.xml
93 # create html single page file
94 user-guide.html: wsug_html/user-guide.html
96 wsug_html/user-guide.html: $(WSUG_SOURCE)
97 @ echo --- WSUG - HTML SINGLE PAGE ---
98 if not exist wsug_html\wsug_graphics\toolbar md wsug_html\wsug_graphics\toolbar
99 cp wsug_graphics/*.* wsug_html/wsug_graphics
100 cp wsug_graphics/toolbar/* wsug_html/wsug_graphics/toolbar
102 $(XSLTPROC) --stringparam base.dir wsug_html/ --stringparam use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsug_graphics/ --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl user-guide.xml > $@
103 -chmod -R og+rX wsug_html
105 # create html chunked page files
106 wsug_html_chunked: wsug_html_chunked\index.html
108 wsug_html_chunked\index.html: $(WSUG_SOURCE)
109 @ echo --- WSUG - HTML CHUNKED ---
110 if not exist wsug_html_chunked\wsug_graphics\toolbar md wsug_html_chunked\wsug_graphics\toolbar
111 cp wsug_graphics/*.* wsug_html_chunked/wsug_graphics
112 cp wsug_graphics/toolbar/* wsug_html_chunked/wsug_graphics/toolbar
113 cp ws.css wsug_html_chunked
114 $(XSLTPROC) --stringparam base.dir wsug_html_chunked/ --stringparam use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsug_graphics/ --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl user-guide.xml
115 -chmod -R og+rX wsug_html_chunked
117 # create pdf file (through XSL-FO), portrait pages on US letter paper (the default)
118 # you will get lot's of errors, but that's ok
119 user-guide-us.fo: $(WSUG_SOURCE) custom_layer_pdf.xsl
121 @ echo --- WSUG - PDF US PAPER ---
122 $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl user-guide.xml > $@
125 # create pdf file (through XSL-FO), portrait pages on A4 paper
126 # you will get lot's of errors, but that's ok
127 user-guide-a4.fo: $(WSUG_SOURCE) custom_layer_pdf.xsl
129 @ echo --- WSUG - PDF A4 PAPER ---
130 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl user-guide.xml > $@
133 # create MS html help file (through html chunked pages)
134 user-guide.chm: $(WSUG_SOURCE)
136 @ echo --- WSUG - MICROSOFT HTML HELP ---
137 if not exist wsug_chm\wsug_graphics\toolbar md wsug_chm\wsug_graphics\toolbar
138 -cp wsug_graphics/*.* wsug_chm/wsug_graphics/
139 -cp wsug_graphics/toolbar/* wsug_chm/wsug_graphics/toolbar/
140 $(XSLTPROC) --stringparam base.dir wsug_chm/ --stringparam use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsug_graphics/ --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl user-guide.xml
146 user-guide.zip: user-guide.chm
148 zip user-guide.zip user-guide.chm
153 wsdg: wsdg_html_chunked developer-guide.html developer-guide-a4.pdf developer-guide-us.pdf developer-guide.chm
155 # validate the content
156 wsdg.validated: $(WSDG_SOURCE)
157 @ echo --- WSDG - VALIDATING XML ---
158 $(XMLLINT) --valid --noout developer-guide.xml
161 # create html single page file
162 developer-guide.html: wsdg_html/developer-guide.html
164 wsdg_html/developer-guide.html: $(WSDG_SOURCE)
165 @ echo --- WSDG - HTML SINGLE PAGE ---
166 if not exist wsdg_html\wsdg_graphics md wsdg_html\wsdg_graphics
167 cp wsdg_graphics/* wsdg_html/wsdg_graphics
169 $(XSLTPROC) --stringparam base.dir wsdg_html/ --stringparam use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsdg_graphics/ --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl developer-guide.xml > $@
170 -chmod -R og+rX wsdg_html
172 # create html chunked page files
173 wsdg_html_chunked: wsdg_html_chunked/index.html
175 wsdg_html_chunked/index.html: $(WSDG_SOURCE)
176 @ echo --- WSDG - HTML CHUNKED ---
177 if not exist wsdg_html_chunked\wsdg_graphics md wsdg_html_chunked\wsdg_graphics
178 cp wsdg_graphics/* wsdg_html_chunked/wsdg_graphics
179 cp ws.css wsdg_html_chunked
180 $(XSLTPROC) --stringparam base.dir wsdg_html_chunked/ --stringparam use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsdg_graphics/ --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl developer-guide.xml
181 -chmod -R og+rX wsdg_html_chunked
183 # create pdf file (through XSL-FO), portrait pages on US letter paper (the default)
184 # you will get lot's of errors, but that's ok
185 developer-guide-us.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
187 @ echo --- WSDG - PDF US PAPER ---
188 $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl developer-guide.xml > $@
191 # create pdf file (through XSL-FO), portrait pages on A4 paper
192 # you will get lot's of errors, but that's ok
193 developer-guide-a4.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
195 @ echo --- WSDG - PDF A4 PAPER ---
196 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl developer-guide.xml > $@
199 # create MS html help file (through html chunked pages)
200 developer-guide.chm: $(WSDG_SOURCE)
202 @ echo --- WSDG - MICROSOFT HTML HELP ---
203 if not exist wsdg_chm\wsdg_graphics md wsdg_chm\wsdg_graphics
204 cp wsdg_graphics/* wsdg_chm/wsdg_graphics
205 $(XSLTPROC) --stringparam base.dir wsdg_chm/ --stringparam use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsdg_graphics/ --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl developer-guide.xml
213 release_notes: release-notes.html release-notes.txt release-notes-a4.pdf release-notes-us.pdf release-notes.chm
215 # validate the content
216 release_notes.validated: $(RELEASE_NOTES_SOURCE)
217 @ echo --- RELEASE NOTES - VALIDATING XML ---
218 $(XMLLINT) --valid --noout release-notes.xml
221 # create html single page file
222 release-notes.html: $(RELEASE_NOTES_SOURCE)
223 @ echo --- RELEASE NOTES - HTML ---
224 $(XSLTPROC) --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl release-notes.xml > $@
226 # create txt single page file (through HTML)
227 release-notes.txt: $(RELEASE_NOTES_SOURCE)
228 @ echo --- RELEASE NOTES - TXT ---
229 $(XSLTPROC) --stringparam generate.toc "article nop" --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl release-notes.xml | $(HTML2TXT) > $@
231 news: release-notes.txt
232 copy release-notes.txt ..\NEWS
234 # create pdf file (through XSL-FO), portrait pages on US letter paper (the default)
235 # you will get lot's of errors, but that's ok
236 release-notes-us.fo: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
238 @ echo --- RELEASE NOTES - PDF US PAPER ---
239 $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl release-notes.xml > $@
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
246 @ echo --- RELEASE NOTES - PDF A4 PAPER ---
247 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl release-notes.xml > $@
250 # create MS html help file (through html chunked pages)
251 release-notes.chm: $(RELEASE_NOTES_SOURCE)
253 @ echo --- RELEASE NOTES - MICROSOFT HTML HELP ---
254 $(XSLTPROC) --stringparam base.dir release_notes_chm/ --stringparam use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsug_graphics/ --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 --nonet http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl release-notes.xml