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 ############### YOU SHOULDN'T HAVE TO EDIT ANYTHING BELOW THIS LINE! ################
13 include ..\config.nmake
14 include Makefile.common
16 # Automatically generate .pdf files from .fo files
21 all: svn_version_check wsug.validated wsdg.validated release_notes.validated wsug wsdg release_notes
29 # on every build, record the working copy revision string
31 # FORCE is the portable version of .PHONY
34 svn_version_check: FORCE
35 @ $(SH) ./check_svn_version.sh
37 svn_version.xml: svn_version_check
40 wsug: wsug_html_chunked user-guide.html user-guide-a4.pdf user-guide-us.pdf user-guide.chm user-guide.zip
42 # validate the content
43 wsug.validated: $(WSUG_SOURCE)
44 @ echo --- WSUG - VALIDATING XML ---
45 $(XMLLINT) --valid --noout user-guide.xml
48 # create html single page file
49 user-guide.html: wsug_html/user-guide.html
51 wsug_html/user-guide.html: $(WSUG_SOURCE)
52 @ echo --- WSUG - HTML SINGLE PAGE ---
53 if not exist wsug_html\wsug_graphics\toolbar md wsug_html\wsug_graphics\toolbar
54 cp wsug_graphics/*.* wsug_html/wsug_graphics
55 cp wsug_graphics/toolbar/* wsug_html/wsug_graphics/toolbar
57 $(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 > $@
58 -chmod -R og+rX wsug_html
60 # create html chunked page files
61 wsug_html_chunked: wsug_html_chunked\index.html
63 wsug_html_chunked\index.html: $(WSUG_SOURCE)
64 @ echo --- WSUG - HTML CHUNKED ---
65 if not exist wsug_html_chunked\wsug_graphics\toolbar md wsug_html_chunked\wsug_graphics\toolbar
66 cp wsug_graphics/*.* wsug_html_chunked/wsug_graphics
67 cp wsug_graphics/toolbar/* wsug_html_chunked/wsug_graphics/toolbar
68 cp ws.css wsug_html_chunked
69 $(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
70 -chmod -R og+rX wsug_html_chunked
72 # create pdf file (through XSL-FO), portrait pages on US letter paper (the default)
73 # you will get lot's of errors, but that's ok
74 user-guide-us.fo: $(WSUG_SOURCE) custom_layer_pdf.xsl
76 @ echo --- WSUG - PDF US PAPER ---
77 $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl user-guide.xml > $@
80 # create pdf file (through XSL-FO), portrait pages on A4 paper
81 # you will get lot's of errors, but that's ok
82 user-guide-a4.fo: $(WSUG_SOURCE) custom_layer_pdf.xsl
84 @ echo --- WSUG - PDF A4 PAPER ---
85 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl user-guide.xml > $@
88 # create MS html help file (through html chunked pages)
89 user-guide.chm: $(WSUG_SOURCE)
91 @ echo --- WSUG - MICROSOFT HTML HELP ---
92 if not exist wsug_chm\wsug_graphics\toolbar md wsug_chm\wsug_graphics\toolbar
93 -cp wsug_graphics/*.* wsug_chm/wsug_graphics/
94 -cp wsug_graphics/toolbar/* wsug_chm/wsug_graphics/toolbar/
95 $(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
96 -$(HHC_EXE) htmlhelp.hhp
101 user-guide.zip: user-guide.chm
103 zip user-guide.zip user-guide.chm
108 wsdg: wsdg_html_chunked developer-guide.html developer-guide-a4.pdf developer-guide-us.pdf developer-guide.chm
110 # validate the content
111 wsdg.validated: $(WSDG_SOURCE)
112 @ echo --- WSDG - VALIDATING XML ---
113 $(XMLLINT) --valid --noout developer-guide.xml
116 # create html single page file
117 developer-guide.html: wsdg_html/developer-guide.html
119 wsdg_html/developer-guide.html: $(WSDG_SOURCE)
120 @ echo --- WSDG - HTML SINGLE PAGE ---
121 if not exist wsdg_html\wsdg_graphics md wsdg_html\wsdg_graphics
122 cp wsdg_graphics/* wsdg_html/wsdg_graphics
124 $(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 > $@
125 -chmod -R og+rX wsdg_html
127 # create html chunked page files
128 wsdg_html_chunked: wsdg_html_chunked/index.html
130 wsdg_html_chunked/index.html: $(WSDG_SOURCE)
131 @ echo --- WSDG - HTML CHUNKED ---
132 if not exist wsdg_html_chunked\wsdg_graphics md wsdg_html_chunked\wsdg_graphics
133 cp wsdg_graphics/* wsdg_html_chunked/wsdg_graphics
134 cp ws.css wsdg_html_chunked
135 $(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
136 -chmod -R og+rX wsdg_html_chunked
138 # create pdf file (through XSL-FO), portrait pages on US letter paper (the default)
139 # you will get lot's of errors, but that's ok
140 developer-guide-us.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
142 @ echo --- WSDG - PDF US PAPER ---
143 $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl developer-guide.xml > $@
146 # create pdf file (through XSL-FO), portrait pages on A4 paper
147 # you will get lot's of errors, but that's ok
148 developer-guide-a4.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
150 @ echo --- WSDG - PDF A4 PAPER ---
151 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl developer-guide.xml > $@
154 # create MS html help file (through html chunked pages)
155 developer-guide.chm: $(WSDG_SOURCE)
157 @ echo --- WSDG - MICROSOFT HTML HELP ---
158 if not exist wsdg_chm\wsdg_graphics md wsdg_chm\wsdg_graphics
159 cp wsdg_graphics/* wsdg_chm/wsdg_graphics
160 $(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
161 -$(HHC_EXE) htmlhelp.hhp
168 release_notes: release-notes.html release-notes.txt release-notes-a4.pdf release-notes-us.pdf release-notes.chm
170 # validate the content
171 release_notes.validated: $(RELEASE_NOTES_SOURCE)
172 @ echo --- RELEASE NOTES - VALIDATING XML ---
173 $(XMLLINT) --valid --noout release-notes.xml
176 # create html single page file
177 release-notes.html: $(RELEASE_NOTES_SOURCE)
178 @ echo --- RELEASE NOTES - HTML ---
179 $(XSLTPROC) --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl release-notes.xml > $@
181 # create txt single page file (through HTML)
182 release-notes.txt: $(RELEASE_NOTES_SOURCE)
183 @ echo --- RELEASE NOTES - TXT ---
184 $(XSLTPROC) --stringparam generate.toc "article nop" --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl release-notes.xml | $(HTML2TXT) > $@
186 news: release-notes.txt
187 copy release-notes.txt ..\NEWS
189 # create pdf file (through XSL-FO), portrait pages on US letter paper (the default)
190 # you will get lot's of errors, but that's ok
191 release-notes-us.fo: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
193 @ echo --- RELEASE NOTES - PDF US PAPER ---
194 $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl release-notes.xml > $@
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 release-notes-a4.fo: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
201 @ echo --- RELEASE NOTES - PDF A4 PAPER ---
202 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl release-notes.xml > $@
205 # create MS html help file (through html chunked pages)
206 release-notes.chm: $(RELEASE_NOTES_SOURCE)
208 @ echo --- RELEASE NOTES - MICROSOFT HTML HELP ---
209 $(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
210 -$(HHC_EXE) htmlhelp.hhp
217 wsluarm: make-wsluarm.pl $(WSLUA_MODULES)
218 $(PERL) make-wsluarm.pl $(WSLUA_MODULES)