2 # Make the "Ethereal User's Guide" in several formats.
3 # See the Readme.txt file for instructions.
8 # if you need to change this, don't forget to change it in catalog.xml too
10 DOCBOOKXSL="/usr/share/docbook-xsl"
11 # On SUSE 9.1 uncomment the following line:
12 #DOCBOOKXSL="/usr/share/xml/docbook/stylesheet/nwalsh/1.64.1"
14 # formatting objects processor
15 # (comment this out, if you don't want pdf or don't have fop installed)
16 # for win32 (cygwin) environments
17 FOP="fop-0.20.5/fop.bat"
18 # for unix like environments (if you have problems with fop, try to use an absolute path here)
19 #FOP="/usr/share/fop-0.20.5/fop.sh"
20 # One SUSE 9.1 uncomment the following line (make sure you have at least fop-0.20.5-71.2)
23 # html help compiler (Win32 only)
24 # (comment this out, if you don't want chm or don't have hhc installed)
25 #HHC="/cygdrive/c/Program Files/HTML Help Workshop/hhc.exe"
27 ############### YOU SHOULDN'T HAVE TO EDIT ANYTHING BELOW THIS LINE! ################
32 # the XML validator (from the xsltproc package)
35 # as eug_chm will stop with an error, make sure it's the last in this dependency list
38 eug: eug_validate eug_pdf_a4 eug_html eug_html_chunked eug_chm
49 rm -rf eug_html_chunked
52 rm -rf edg_html_chunked
57 cp $(DOCBOOKXSL)/images/note.png ./graphics
58 cp $(DOCBOOKXSL)/images/tip.png ./graphics
59 cp $(DOCBOOKXSL)/images/warning.png ./graphics
61 # validate the content
63 @ echo --- VALIDATING XML ---
64 $(XMLLINT) --valid --noout user-guide.xml
66 # create html single page file
68 @ echo --- HTML SINGLE PAGE ---
70 mkdir -p eug_html/graphics
71 mkdir -p eug_html/graphics/toolbar
72 cp ./graphics/*.* eug_html/graphics
73 cp ./graphics/toolbar/*.* eug_html/graphics/toolbar
74 $(XSLTPROC) --nonet $(DOCBOOKXSL)/html/docbook.xsl user-guide.xml > eug_html/user-guide.html
76 # create html chunked page files
77 eug_html_chunked: images
78 @ echo --- HTML CHUNKED ---
79 mkdir -p eug_html_chunked
80 mkdir -p eug_html_chunked/graphics
81 mkdir -p eug_html_chunked/graphics/toolbar
82 cp ./graphics/*.* eug_html_chunked/graphics
83 cp ./graphics/toolbar/*.* eug_html_chunked/graphics/toolbar
84 $(XSLTPROC) --stringparam base.dir eug_html_chunked/ --stringparam use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path graphics/ --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 --nonet $(DOCBOOKXSL)/html/chunk.xsl user-guide.xml
86 # create pdf file (through XSL-FO), portrait pages on US letter paper (the default)
87 # you will get lot's of errors, but that's ok
90 @ echo --- PDF US PAPER ---
91 $(XSLTPROC) --nonet custom_layer_pdf.xsl $(DOCBOOKXSL)/fo/docbook.xsl user-guide.xml > user-guide.fo
92 $(FOP) user-guide.fo user-guide.pdf
95 # create pdf file (through XSL-FO), portrait pages on A4 paper
96 # you will get lot's of errors, but that's ok
99 @ echo --- PDF A4 PAPER ---
100 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl user-guide.xml > user-guide.fo
101 $(FOP) user-guide.fo user-guide.pdf
104 # create MS html help file (through html chunked pages)
107 @ echo --- MICROSOFT HTML HELP ---
109 mkdir -p eug_chm/graphics
110 mkdir -p eug_chm/graphics/toolbar
111 cp ./graphics/*.* eug_chm/graphics
112 cp ./graphics/toolbar/*.* eug_chm/graphics/toolbar
113 $(XSLTPROC) --stringparam base.dir eug_chm/ --stringparam use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path graphics/ --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 --nonet $(DOCBOOKXSL)/htmlhelp/htmlhelp.xsl user-guide.xml
115 mv htmlhelp.chm user-guide.chm
121 edg: edg_validate edg_html_chunked edg_pdf_a4 edg_html edg_chm
123 # validate the content
125 @ echo --- VALIDATING XML ---
126 $(XMLLINT) --valid --noout developer-guide.xml
128 # create html single page file
130 @ echo --- HTML SINGLE PAGE ---
132 mkdir -p edg_html/graphics
133 mkdir -p edg_html/graphics/toolbar
134 cp ./graphics/*.* edg_html/graphics
135 cp ./graphics/toolbar/*.* edg_html/graphics/toolbar
136 $(XSLTPROC) --nonet $(DOCBOOKXSL)/html/docbook.xsl developer-guide.xml > edg_html/developer-guide.html
138 # create html chunked page files
139 edg_html_chunked: images
140 @ echo --- HTML CHUNKED ---
141 mkdir -p edg_html_chunked
142 mkdir -p edg_html_chunked/graphics
143 mkdir -p edg_html_chunked/graphics/toolbar
144 cp ./graphics/*.* edg_html_chunked/graphics
145 cp ./graphics/toolbar/*.* edg_html_chunked/graphics/toolbar
146 $(XSLTPROC) --stringparam base.dir edg_html_chunked/ --stringparam use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path graphics/ --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 --nonet $(DOCBOOKXSL)/html/chunk.xsl developer-guide.xml
148 # create pdf file (through XSL-FO), portrait pages on US letter paper (the default)
149 # you will get lot's of errors, but that's ok
152 @ echo --- PDF US PAPER ---
153 $(XSLTPROC) --nonet custom_layer_pdf.xsl $(DOCBOOKXSL)/fo/docbook.xsl developer-guide.xml > developer-guide.fo
154 $(FOP) developer-guide.fo developer-guide.pdf
157 # create pdf file (through XSL-FO), portrait pages on A4 paper
158 # you will get lot's of errors, but that's ok
161 @ echo --- PDF A4 PAPER ---
162 $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl developer-guide.xml > developer-guide.fo
163 $(FOP) developer-guide.fo developer-guide.pdf
166 # create MS html help file (through html chunked pages)
169 @ echo --- MICROSOFT HTML HELP ---
171 mkdir -p edg_chm/graphics
172 mkdir -p edg_chm/graphics/toolbar
173 cp ./graphics/*.* edg_chm/graphics
174 cp ./graphics/toolbar/*.* edg_chm/graphics/toolbar
175 $(XSLTPROC) --stringparam base.dir edg_chm/ --stringparam use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path graphics/ --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 --nonet $(DOCBOOKXSL)/htmlhelp/htmlhelp.xsl developer-guide.xml
177 mv htmlhelp.chm developer-guide.chm