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 [target ...]
11 ############### YOU SHOULDN'T HAVE TO EDIT ANYTHING BELOW THIS LINE! ################
14 include ..\config.nmake
15 include Makefile.common
17 WSUG_SOURCE = $(WSUG_SOURCE) Makefile.nmake Makefile.common
18 WSDG_SOURCE = $(WSDG_SOURCE) Makefile.nmake Makefile.common
19 RELEASE_NOTES_SOURCE = $(RELEASE_NOTES_SOURCE) Makefile.nmake Makefile.common
21 # Automatically generate .pdf files from .fo files
27 # On every build, record the working copy revision string
28 # in svn_version.xml (if the svn version has changed).
29 # This is done during nmake "preprocessing" so that it's done *before*
30 # nmake gets the date/time of the dependency file(s)].
31 !IF [$(SH) ./check_svn_version.sh]
35 # -- (Public) targets -------------------------------------------------------
41 wsug: wsug.validated wsug_x
44 wsdg: wsdg.validated wsdg_x
46 # Make only the release notes
47 release_notes: release_notes.validated release_notes_x
53 # -- All -------------------------------------------------------------------------------
55 all_x: wsug.validated wsdg.validated release_notes.validated wsug_x wsdg_x release_notes_x
57 # -- User Guide ------------------------------------------------------------------------
59 wsug_x: wsug_html_chunked user-guide.html user-guide-a4.pdf user-guide-us.pdf user-guide.chm user-guide.zip
61 # validate the content
62 wsug.validated: $(WSUG_SOURCE)
63 @ echo --- WSUG - VALIDATING XML ---
64 $(XMLLINT) --valid --noout user-guide.xml
67 # create html single page file
68 user-guide.html: wsug_html/user-guide.html
70 wsug_html/user-guide.html: $(WSUG_SOURCE)
71 @ echo --- WSUG - HTML SINGLE PAGE ---
72 if not exist wsug_html\wsug_graphics\toolbar md wsug_html\wsug_graphics\toolbar
73 cp wsug_graphics/*.* wsug_html/wsug_graphics
74 cp wsug_graphics/toolbar/* wsug_html/wsug_graphics/toolbar
76 $(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 > $@
77 -chmod -R og+rX wsug_html
79 # create html chunked page files
80 wsug_html_chunked: wsug_html_chunked\index.html
82 wsug_html_chunked\index.html: $(WSUG_SOURCE)
83 @ echo --- WSUG - HTML CHUNKED ---
84 if not exist wsug_html_chunked\wsug_graphics\toolbar md wsug_html_chunked\wsug_graphics\toolbar
85 cp wsug_graphics/*.* wsug_html_chunked/wsug_graphics
86 cp wsug_graphics/toolbar/* wsug_html_chunked/wsug_graphics/toolbar
87 cp ws.css wsug_html_chunked
88 $(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
89 -chmod -R og+rX wsug_html_chunked
91 # create pdf file (through XSL-FO), portrait pages on US letter paper (the default)
92 # you will get lot's of errors, but that's ok
93 user-guide-us.fo: $(WSUG_SOURCE) custom_layer_pdf.xsl
95 @ echo --- WSUG - PDF US PAPER ---
96 $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl user-guide.xml > $@
99 # create pdf file (through XSL-FO), portrait pages on A4 paper
100 # you will get lot's of errors, but that's ok
101 user-guide-a4.fo: $(WSUG_SOURCE) custom_layer_pdf.xsl
103 @ echo --- WSUG - PDF A4 PAPER ---
104 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl user-guide.xml > $@
107 # create MS html help file (through html chunked pages)
108 user-guide.chm: $(WSUG_SOURCE)
110 @ echo --- WSUG - MICROSOFT HTML HELP ---
111 if not exist wsug_chm\wsug_graphics\toolbar md wsug_chm\wsug_graphics\toolbar
112 -cp wsug_graphics/*.* wsug_chm/wsug_graphics/
113 -cp wsug_graphics/toolbar/* wsug_chm/wsug_graphics/toolbar/
114 $(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
115 -$(HHC_EXE) htmlhelp.hhp
120 user-guide.zip: user-guide.chm
122 zip user-guide.zip user-guide.chm
127 wsluarm: make-wsluarm.pl $(WSLUA_MODULES)
128 $(PERL) make-wsluarm.pl $(WSLUA_MODULES)
131 # -- Developer's Guide ------------------------------------------------------------------------
133 wsdg_x: wsdg_html_chunked developer-guide.html developer-guide-a4.pdf developer-guide-us.pdf developer-guide.chm
135 # validate the content
136 wsdg.validated: $(WSDG_SOURCE)
137 @ echo --- WSDG - VALIDATING XML ---
138 $(XMLLINT) --valid --noout developer-guide.xml
141 # create html single page file
142 developer-guide.html: wsdg_html/developer-guide.html
144 wsdg_html/developer-guide.html: $(WSDG_SOURCE)
145 @ echo --- WSDG - HTML SINGLE PAGE ---
146 if not exist wsdg_html\wsdg_graphics md wsdg_html\wsdg_graphics
147 cp wsdg_graphics/* wsdg_html/wsdg_graphics
149 $(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 > $@
150 -chmod -R og+rX wsdg_html
152 # create html chunked page files
153 wsdg_html_chunked: wsdg_html_chunked/index.html
155 wsdg_html_chunked/index.html: $(WSDG_SOURCE)
156 @ echo --- WSDG - HTML CHUNKED ---
157 if not exist wsdg_html_chunked\wsdg_graphics md wsdg_html_chunked\wsdg_graphics
158 cp wsdg_graphics/* wsdg_html_chunked/wsdg_graphics
159 cp ws.css wsdg_html_chunked
160 $(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
161 -chmod -R og+rX wsdg_html_chunked
163 # create pdf file (through XSL-FO), portrait pages on US letter paper (the default)
164 # you will get lot's of errors, but that's ok
165 developer-guide-us.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
167 @ echo --- WSDG - PDF US PAPER ---
168 $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl developer-guide.xml > $@
171 # create pdf file (through XSL-FO), portrait pages on A4 paper
172 # you will get lot's of errors, but that's ok
173 developer-guide-a4.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
175 @ echo --- WSDG - PDF A4 PAPER ---
176 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl developer-guide.xml > $@
179 # create MS html help file (through html chunked pages)
180 developer-guide.chm: $(WSDG_SOURCE)
182 @ echo --- WSDG - MICROSOFT HTML HELP ---
183 if not exist wsdg_chm\wsdg_graphics md wsdg_chm\wsdg_graphics
184 cp wsdg_graphics/* wsdg_chm/wsdg_graphics
185 $(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
186 -$(HHC_EXE) htmlhelp.hhp
192 # -- Release Notes ------------------------------------------------------------------------
194 release_notes_x: release-notes.html release-notes.txt release-notes-a4.pdf release-notes-us.pdf release-notes.chm
196 # validate the content
197 release_notes.validated: $(RELEASE_NOTES_SOURCE)
198 @ echo --- RELEASE NOTES - VALIDATING XML ---
199 $(XMLLINT) --valid --noout release-notes.xml
202 # create html single page file
203 release-notes.html: $(RELEASE_NOTES_SOURCE)
204 @ echo --- RELEASE NOTES - HTML ---
205 $(XSLTPROC) --nonet http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl release-notes.xml > $@
207 # create txt single page file (through HTML)
208 release-notes.txt: $(RELEASE_NOTES_SOURCE)
209 @ echo --- RELEASE NOTES - TXT ---
210 $(XSLTPROC) --stringparam generate.toc "article nop" --nonet http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl release-notes.xml | $(HTML2TXT) > $@
212 news: release-notes.txt
213 copy release-notes.txt ..\NEWS
215 # create pdf file (through XSL-FO), portrait pages on US letter paper (the default)
216 # you will get lot's of errors, but that's ok
217 release-notes-us.fo: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
219 @ echo --- RELEASE NOTES - PDF US PAPER ---
220 $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl release-notes.xml > $@
223 # create pdf file (through XSL-FO), portrait pages on A4 paper
224 # you will get lot's of errors, but that's ok
225 release-notes-a4.fo: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
227 @ echo --- RELEASE NOTES - PDF A4 PAPER ---
228 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl release-notes.xml > $@
231 # create MS html help file (through html chunked pages)
232 release-notes.chm: $(RELEASE_NOTES_SOURCE)
234 @ echo --- RELEASE NOTES - MICROSOFT HTML HELP ---
235 $(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
236 -$(HHC_EXE) htmlhelp.hhp