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! ################
14 include ..\config.nmake
15 include Makefile.common
17 # Automatically generate .pdf files from .fo files
22 all: svn_version_check wsug.validated wsdg.validated release_notes.validated wsug wsdg release_notes
30 # on every build, record the working copy revision string
32 # FORCE is the portable version of .PHONY
35 svn_version_check: FORCE
36 @ $(SH) ./check_svn_version.sh
38 svn_version.xml: svn_version_check
41 wsug: wsug_html_chunked user-guide.html user-guide-a4.pdf user-guide-us.pdf user-guide.chm user-guide.zip
43 # validate the content
44 wsug.validated: $(WSUG_SOURCE)
45 @ echo --- WSUG - VALIDATING XML ---
46 $(XMLLINT) --valid --noout user-guide.xml
49 # create html single page file
50 user-guide.html: wsug_html/user-guide.html
52 wsug_html/user-guide.html: $(WSUG_SOURCE)
53 @ echo --- WSUG - HTML SINGLE PAGE ---
54 if not exist wsug_html\wsug_graphics\toolbar md wsug_html\wsug_graphics\toolbar
55 cp wsug_graphics/*.* wsug_html/wsug_graphics
56 cp wsug_graphics/toolbar/* wsug_html/wsug_graphics/toolbar
58 $(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 > $@
59 -chmod -R og+rX wsug_html
61 # create html chunked page files
62 wsug_html_chunked: wsug_html_chunked\index.html
64 wsug_html_chunked\index.html: $(WSUG_SOURCE)
65 @ echo --- WSUG - HTML CHUNKED ---
66 if not exist wsug_html_chunked\wsug_graphics\toolbar md wsug_html_chunked\wsug_graphics\toolbar
67 cp wsug_graphics/*.* wsug_html_chunked/wsug_graphics
68 cp wsug_graphics/toolbar/* wsug_html_chunked/wsug_graphics/toolbar
69 cp ws.css wsug_html_chunked
70 $(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
71 -chmod -R og+rX wsug_html_chunked
73 # create pdf file (through XSL-FO), portrait pages on US letter paper (the default)
74 # you will get lot's of errors, but that's ok
75 user-guide-us.fo: $(WSUG_SOURCE) custom_layer_pdf.xsl
77 @ echo --- WSUG - PDF US PAPER ---
78 $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl user-guide.xml > $@
81 # create pdf file (through XSL-FO), portrait pages on A4 paper
82 # you will get lot's of errors, but that's ok
83 user-guide-a4.fo: $(WSUG_SOURCE) custom_layer_pdf.xsl
85 @ echo --- WSUG - PDF A4 PAPER ---
86 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl user-guide.xml > $@
89 # create MS html help file (through html chunked pages)
90 user-guide.chm: $(WSUG_SOURCE)
92 @ echo --- WSUG - MICROSOFT HTML HELP ---
93 if not exist wsug_chm\wsug_graphics\toolbar md wsug_chm\wsug_graphics\toolbar
94 -cp wsug_graphics/*.* wsug_chm/wsug_graphics/
95 -cp wsug_graphics/toolbar/* wsug_chm/wsug_graphics/toolbar/
96 $(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
97 -$(HHC_EXE) htmlhelp.hhp
102 user-guide.zip: user-guide.chm
104 zip user-guide.zip user-guide.chm
109 wsdg: wsdg_html_chunked developer-guide.html developer-guide-a4.pdf developer-guide-us.pdf developer-guide.chm
111 # validate the content
112 wsdg.validated: $(WSDG_SOURCE)
113 @ echo --- WSDG - VALIDATING XML ---
114 $(XMLLINT) --valid --noout developer-guide.xml
117 # create html single page file
118 developer-guide.html: wsdg_html/developer-guide.html
120 wsdg_html/developer-guide.html: $(WSDG_SOURCE)
121 @ echo --- WSDG - HTML SINGLE PAGE ---
122 if not exist wsdg_html\wsdg_graphics md wsdg_html\wsdg_graphics
123 cp wsdg_graphics/* wsdg_html/wsdg_graphics
125 $(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 > $@
126 -chmod -R og+rX wsdg_html
128 # create html chunked page files
129 wsdg_html_chunked: wsdg_html_chunked/index.html
131 wsdg_html_chunked/index.html: $(WSDG_SOURCE)
132 @ echo --- WSDG - HTML CHUNKED ---
133 if not exist wsdg_html_chunked\wsdg_graphics md wsdg_html_chunked\wsdg_graphics
134 cp wsdg_graphics/* wsdg_html_chunked/wsdg_graphics
135 cp ws.css wsdg_html_chunked
136 $(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
137 -chmod -R og+rX wsdg_html_chunked
139 # create pdf file (through XSL-FO), portrait pages on US letter paper (the default)
140 # you will get lot's of errors, but that's ok
141 developer-guide-us.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
143 @ echo --- WSDG - PDF US PAPER ---
144 $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl developer-guide.xml > $@
147 # create pdf file (through XSL-FO), portrait pages on A4 paper
148 # you will get lot's of errors, but that's ok
149 developer-guide-a4.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
151 @ echo --- WSDG - PDF A4 PAPER ---
152 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl developer-guide.xml > $@
155 # create MS html help file (through html chunked pages)
156 developer-guide.chm: $(WSDG_SOURCE)
158 @ echo --- WSDG - MICROSOFT HTML HELP ---
159 if not exist wsdg_chm\wsdg_graphics md wsdg_chm\wsdg_graphics
160 cp wsdg_graphics/* wsdg_chm/wsdg_graphics
161 $(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
162 -$(HHC_EXE) htmlhelp.hhp
169 release_notes: release-notes.html release-notes.txt release-notes-a4.pdf release-notes-us.pdf release-notes.chm
171 # validate the content
172 release_notes.validated: $(RELEASE_NOTES_SOURCE)
173 @ echo --- RELEASE NOTES - VALIDATING XML ---
174 $(XMLLINT) --valid --noout release-notes.xml
177 # create html single page file
178 release-notes.html: $(RELEASE_NOTES_SOURCE)
179 @ echo --- RELEASE NOTES - HTML ---
180 $(XSLTPROC) --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl release-notes.xml > $@
182 # create txt single page file (through HTML)
183 release-notes.txt: $(RELEASE_NOTES_SOURCE)
184 @ echo --- RELEASE NOTES - TXT ---
185 $(XSLTPROC) --stringparam generate.toc "article nop" --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl release-notes.xml | $(HTML2TXT) > $@
187 news: release-notes.txt
188 copy release-notes.txt ..\NEWS
190 # create pdf file (through XSL-FO), portrait pages on US letter paper (the default)
191 # you will get lot's of errors, but that's ok
192 release-notes-us.fo: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
194 @ echo --- RELEASE NOTES - PDF US PAPER ---
195 $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl release-notes.xml > $@
198 # create pdf file (through XSL-FO), portrait pages on A4 paper
199 # you will get lot's of errors, but that's ok
200 release-notes-a4.fo: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
202 @ echo --- RELEASE NOTES - PDF A4 PAPER ---
203 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl release-notes.xml > $@
206 # create MS html help file (through html chunked pages)
207 release-notes.chm: $(RELEASE_NOTES_SOURCE)
209 @ echo --- RELEASE NOTES - MICROSOFT HTML HELP ---
210 $(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
211 -$(HHC_EXE) htmlhelp.hhp
218 wsluarm: make-wsluarm.pl $(WSLUA_MODULES)
219 $(PERL) make-wsluarm.pl $(WSLUA_MODULES)