2005-02-20 05:01:46 +00:00
|
|
|
#
|
2006-06-06 23:08:58 +00:00
|
|
|
# Make the "Wireshark User Guide" and "Wireshark Developer Guide"
|
2005-02-20 05:01:46 +00:00
|
|
|
# in several formats.
|
|
|
|
# See the Readme.txt file for instructions.
|
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
|
|
|
|
# if you need to change this, don't forget to change it in catalog.xml too
|
|
|
|
|
|
|
|
# On suse 9.2, uncomment the following line:
|
|
|
|
DOCBOOKXSL="/usr/share/xml/docbook/stylesheet/nwalsh/1.65.1"
|
|
|
|
|
|
|
|
#DOCBOOKXSL="/usr/share/docbook-xsl"
|
|
|
|
|
|
|
|
############### YOU SHOULDN'T HAVE TO EDIT ANYTHING BELOW THIS LINE! ################
|
|
|
|
|
2006-05-30 21:34:56 +00:00
|
|
|
# as wsug_chm will stop with an error, make sure it's the last in this dependency list
|
2006-06-06 23:08:58 +00:00
|
|
|
all: wsug wsdg
|
2005-02-20 05:01:46 +00:00
|
|
|
|
2006-05-30 21:34:56 +00:00
|
|
|
wsug: wsug_validate wsug_pdf_a4 wsug_html wsug_html_chunked wsug_chm
|
2005-02-20 05:01:46 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.html
|
|
|
|
rm -f htmlhelp.*
|
|
|
|
rm -f *.hhc
|
|
|
|
rm -f *.hhp
|
|
|
|
rm -f *.fo
|
|
|
|
rm -f *.pdf
|
|
|
|
rm -f *.chm
|
2006-05-30 21:34:56 +00:00
|
|
|
rm -rf wsug_html
|
|
|
|
rm -rf wsug_html_chunked
|
|
|
|
rm -rf wsug_chm
|
2006-06-06 23:08:58 +00:00
|
|
|
rm -rf wsdg_html
|
|
|
|
rm -rf wsdg_html_chunked
|
|
|
|
rm -rf wsdg_chm
|
2005-02-20 05:01:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
# validate the content
|
2006-05-30 21:34:56 +00:00
|
|
|
wsug_validate:
|
2005-02-20 05:01:46 +00:00
|
|
|
@ echo --- VALIDATING XML ---
|
|
|
|
$(XMLLINT) --valid --noout user-guide.xml
|
|
|
|
|
|
|
|
# create html single page file
|
2006-05-30 21:34:56 +00:00
|
|
|
wsug_html:
|
2005-02-20 05:01:46 +00:00
|
|
|
@ echo --- HTML SINGLE PAGE ---
|
2006-05-30 21:34:56 +00:00
|
|
|
mkdir -p wsug_html
|
2006-06-15 14:18:03 +00:00
|
|
|
mkdir -p wsug_html/wsug_graphics
|
|
|
|
mkdir -p wsug_html/wsug_graphics/toolbar
|
|
|
|
cp ./wsug_graphics/*.* wsug_html/wsug_graphics
|
|
|
|
cp ./wsug_graphics/toolbar/*.* wsug_html/wsug_graphics/toolbar
|
2006-05-30 21:34:56 +00:00
|
|
|
$(XSLTPROC) --nonet $(DOCBOOKXSL)/html/docbook.xsl user-guide.xml > wsug_html/user-guide.html
|
2005-02-20 05:01:46 +00:00
|
|
|
|
|
|
|
# create html chunked page files
|
2006-06-15 14:13:56 +00:00
|
|
|
wsug_html_chunked:
|
2005-02-20 05:01:46 +00:00
|
|
|
@ echo --- HTML CHUNKED ---
|
2006-05-30 21:34:56 +00:00
|
|
|
mkdir -p wsug_html_chunked
|
2006-06-15 14:18:03 +00:00
|
|
|
mkdir -p wsug_html_chunked/wsug_graphics
|
|
|
|
mkdir -p wsug_html_chunked/wsug_graphics/toolbar
|
|
|
|
cp ./wsug_graphics/*.* wsug_html_chunked/wsug_graphics
|
|
|
|
cp ./wsug_graphics/toolbar/*.* wsug_html_chunked/wsug_graphics/toolbar
|
|
|
|
$(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 --nonet $(DOCBOOKXSL)/html/chunk.xsl user-guide.xml
|
2005-02-20 05:01:46 +00:00
|
|
|
|
|
|
|
# create pdf file (through XSL-FO), portrait pages on US letter paper (the default)
|
|
|
|
# you will get lot's of errors, but that's ok
|
2006-06-15 14:13:56 +00:00
|
|
|
wsug_pdf_us:
|
2005-02-20 05:01:46 +00:00
|
|
|
if HAVE_FOP
|
|
|
|
@ echo --- PDF US PAPER ---
|
|
|
|
$(XSLTPROC) --nonet custom_layer_pdf.xsl $(DOCBOOKXSL)/fo/docbook.xsl user-guide.xml > user-guide.fo
|
|
|
|
$(FOP) user-guide.fo user-guide.pdf
|
|
|
|
endif
|
|
|
|
|
|
|
|
# create pdf file (through XSL-FO), portrait pages on A4 paper
|
|
|
|
# you will get lot's of errors, but that's ok
|
2006-06-15 14:13:56 +00:00
|
|
|
wsug_pdf_a4:
|
2005-02-20 05:01:46 +00:00
|
|
|
if HAVE_FOP
|
|
|
|
@ echo --- PDF A4 PAPER ---
|
|
|
|
$(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl user-guide.xml > user-guide.fo
|
|
|
|
$(FOP) user-guide.fo user-guide.pdf
|
|
|
|
endif
|
|
|
|
|
|
|
|
# create MS html help file (through html chunked pages)
|
2006-06-15 14:13:56 +00:00
|
|
|
wsug_chm:
|
2005-02-20 05:01:46 +00:00
|
|
|
if HAVE_HHC
|
|
|
|
@ echo --- MICROSOFT HTML HELP ---
|
2006-05-30 21:34:56 +00:00
|
|
|
mkdir -p wsug_chm
|
2006-06-15 14:18:03 +00:00
|
|
|
mkdir -p wsug_chm/wsug_graphics
|
|
|
|
mkdir -p wsug_chm/wsug_graphics/toolbar
|
|
|
|
cp ./wsug_graphics/*.* wsug_chm/wsug_graphics
|
|
|
|
cp ./wsug_graphics/toolbar/*.* wsug_chm/wsug_graphics/toolbar
|
|
|
|
$(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 --nonet $(DOCBOOKXSL)/htmlhelp/htmlhelp.xsl user-guide.xml
|
2005-02-20 05:01:46 +00:00
|
|
|
-$(HHC) htmlhelp.hhp
|
|
|
|
mv htmlhelp.chm user-guide.chm
|
|
|
|
rm -r htmlhelp.hhp
|
|
|
|
rm -r toc.hhc
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2006-06-06 23:08:58 +00:00
|
|
|
wsdg: wsdg_validate wsdg_html_chunked wsdg_pdf_a4 wsdg_html wsdg_chm
|
2005-02-20 05:01:46 +00:00
|
|
|
|
|
|
|
# validate the content
|
2006-06-06 23:08:58 +00:00
|
|
|
wsdg_validate:
|
2005-02-20 05:01:46 +00:00
|
|
|
@ echo --- VALIDATING XML ---
|
|
|
|
$(XMLLINT) --valid --noout developer-guide.xml
|
|
|
|
|
|
|
|
# create html single page file
|
2006-06-06 23:08:58 +00:00
|
|
|
wsdg_html:
|
2005-02-20 05:01:46 +00:00
|
|
|
@ echo --- HTML SINGLE PAGE ---
|
2006-06-06 23:08:58 +00:00
|
|
|
mkdir -p wsdg_html
|
2006-06-15 14:18:03 +00:00
|
|
|
mkdir -p wsdg_html/wsdg_graphics
|
|
|
|
mkdir -p wsdg_html/wsdg_graphics/toolbar
|
|
|
|
cp ./wsdg_graphics/*.* wsdg_html/wsdg_graphics
|
|
|
|
cp ./wsdg_graphics/toolbar/*.* wsdg_html/wsdg_graphics/toolbar
|
2006-06-06 23:08:58 +00:00
|
|
|
$(XSLTPROC) --nonet $(DOCBOOKXSL)/html/docbook.xsl developer-guide.xml > wsdg_html/developer-guide.html
|
2005-02-20 05:01:46 +00:00
|
|
|
|
|
|
|
# create html chunked page files
|
2006-06-15 14:13:56 +00:00
|
|
|
wsdg_html_chunked:
|
2005-02-20 05:01:46 +00:00
|
|
|
@ echo --- HTML CHUNKED ---
|
2006-06-06 23:08:58 +00:00
|
|
|
mkdir -p wsdg_html_chunked
|
2006-06-15 14:18:03 +00:00
|
|
|
mkdir -p wsdg_html_chunked/wsdg_graphics
|
|
|
|
mkdir -p wsdg_html_chunked/wsdg_graphics/toolbar
|
|
|
|
cp ./wsdg_graphics/*.* wsdg_html_chunked/wsdg_graphics
|
|
|
|
cp ./wsdg_graphics/toolbar/*.* wsdg_html_chunked/wsdg_graphics/toolbar
|
|
|
|
$(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 --nonet $(DOCBOOKXSL)/html/chunk.xsl developer-guide.xml
|
2005-02-20 05:01:46 +00:00
|
|
|
|
|
|
|
# create pdf file (through XSL-FO), portrait pages on US letter paper (the default)
|
|
|
|
# you will get lot's of errors, but that's ok
|
2006-06-15 14:13:56 +00:00
|
|
|
wsdg_pdf_us:
|
2005-02-20 05:01:46 +00:00
|
|
|
if HAVE_FOP
|
|
|
|
@ echo --- PDF US PAPER ---
|
|
|
|
$(XSLTPROC) --nonet custom_layer_pdf.xsl $(DOCBOOKXSL)/fo/docbook.xsl developer-guide.xml > developer-guide.fo
|
|
|
|
$(FOP) developer-guide.fo developer-guide.pdf
|
|
|
|
endif
|
|
|
|
|
|
|
|
# create pdf file (through XSL-FO), portrait pages on A4 paper
|
|
|
|
# you will get lot's of errors, but that's ok
|
2006-06-15 14:13:56 +00:00
|
|
|
wsdg_pdf_a4:
|
2005-02-20 05:01:46 +00:00
|
|
|
if HAVE_FOP
|
|
|
|
@ echo --- PDF A4 PAPER ---
|
|
|
|
$(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl developer-guide.xml > developer-guide.fo
|
|
|
|
$(FOP) developer-guide.fo developer-guide.pdf
|
|
|
|
endif
|
|
|
|
|
|
|
|
# create MS html help file (through html chunked pages)
|
2006-06-15 14:13:56 +00:00
|
|
|
wsdg_chm:
|
2005-02-20 05:01:46 +00:00
|
|
|
if HAVE_HHC
|
|
|
|
@ echo --- MICROSOFT HTML HELP ---
|
2006-06-06 23:08:58 +00:00
|
|
|
mkdir -p wsdg_chm
|
2006-06-15 14:18:03 +00:00
|
|
|
mkdir -p wsdg_chm/wsdg_graphics
|
|
|
|
mkdir -p wsdg_chm/wsdg_graphics/toolbar
|
|
|
|
cp ./wsdg_graphics/*.* wsdg_chm/wsdg_graphics
|
|
|
|
cp ./wsdg_graphics/toolbar/*.* wsdg_chm/wsdg_graphics/toolbar
|
|
|
|
$(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 --nonet $(DOCBOOKXSL)/htmlhelp/htmlhelp.xsl developer-guide.xml
|
2005-02-20 05:01:46 +00:00
|
|
|
-$(HHC) htmlhelp.hhp
|
|
|
|
mv htmlhelp.chm developer-guide.chm
|
|
|
|
rm -r htmlhelp.hhp
|
|
|
|
rm -r toc.hhc
|
|
|
|
endif
|
|
|
|
|