Add the recent fix for CID 105.
[obnox/wireshark/wip.git] / docbook / Makefile.auto.am
1 #
2 # Make the "Ethereal User Guide" and "Ethereal Developer Guide"
3 # in several formats.
4 # See the Readme.txt file for instructions.
5 #
6 # $Id$
7 #
8
9 # if you need to change this, don't forget to change it in catalog.xml too
10
11 # On suse 9.2, uncomment the following line:
12 DOCBOOKXSL="/usr/share/xml/docbook/stylesheet/nwalsh/1.65.1"
13
14 #DOCBOOKXSL="/usr/share/docbook-xsl"
15
16 ############### YOU SHOULDN'T HAVE TO EDIT ANYTHING BELOW THIS LINE! ################
17
18 # as eug_chm will stop with an error, make sure it's the last in this dependency list
19 all: eug edg 
20
21 eug: eug_validate eug_pdf_a4 eug_html eug_html_chunked eug_chm 
22
23 clean:
24         rm -f *.html
25         rm -f htmlhelp.*
26         rm -f *.hhc
27         rm -f *.hhp
28         rm -f *.fo
29         rm -f *.pdf
30         rm -f *.chm
31         rm -rf eug_html
32         rm -rf eug_html_chunked
33         rm -rf eug_chm
34         rm -rf edg_html
35         rm -rf edg_html_chunked
36         rm -rf edg_chm
37
38
39 images:
40         cp $(DOCBOOKXSL)/images/note.png ./graphics
41         cp $(DOCBOOKXSL)/images/tip.png ./graphics
42         cp $(DOCBOOKXSL)/images/warning.png ./graphics
43
44 # validate the content
45 eug_validate:
46         @ echo --- VALIDATING XML ---
47         $(XMLLINT) --valid --noout user-guide.xml
48
49 # create html single page file
50 eug_html:
51         @ echo --- HTML SINGLE PAGE ---
52         mkdir -p eug_html
53         mkdir -p eug_html/graphics
54         mkdir -p eug_html/graphics/toolbar
55         cp ./graphics/*.* eug_html/graphics
56         cp ./graphics/toolbar/*.* eug_html/graphics/toolbar
57         $(XSLTPROC) --nonet $(DOCBOOKXSL)/html/docbook.xsl user-guide.xml > eug_html/user-guide.html
58         
59 # create html chunked page files
60 eug_html_chunked: images
61         @ echo --- HTML CHUNKED ---
62         mkdir -p eug_html_chunked
63         mkdir -p eug_html_chunked/graphics
64         mkdir -p eug_html_chunked/graphics/toolbar
65         cp ./graphics/*.* eug_html_chunked/graphics
66         cp ./graphics/toolbar/*.* eug_html_chunked/graphics/toolbar
67         $(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
68
69 # create pdf file (through XSL-FO), portrait pages on US letter paper (the default)
70 # you will get lot's of errors, but that's ok
71 eug_pdf_us: images
72 if HAVE_FOP
73         @ echo --- PDF US PAPER ---
74         $(XSLTPROC) --nonet custom_layer_pdf.xsl $(DOCBOOKXSL)/fo/docbook.xsl user-guide.xml > user-guide.fo
75         $(FOP) user-guide.fo user-guide.pdf
76 endif
77
78 # create pdf file (through XSL-FO), portrait pages on A4 paper
79 # you will get lot's of errors, but that's ok
80 eug_pdf_a4: images
81 if HAVE_FOP
82         @ echo --- PDF A4 PAPER ---
83         $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl user-guide.xml > user-guide.fo
84         $(FOP) user-guide.fo user-guide.pdf
85 endif
86
87 # create MS html help file (through html chunked pages)
88 eug_chm: images
89 if HAVE_HHC
90         @ echo --- MICROSOFT HTML HELP ---
91         mkdir -p eug_chm
92         mkdir -p eug_chm/graphics
93         mkdir -p eug_chm/graphics/toolbar
94         cp ./graphics/*.* eug_chm/graphics
95         cp ./graphics/toolbar/*.* eug_chm/graphics/toolbar
96         $(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
97         -$(HHC) htmlhelp.hhp
98         mv htmlhelp.chm user-guide.chm
99         rm -r htmlhelp.hhp
100         rm -r toc.hhc
101 endif
102
103
104 edg: edg_validate edg_html_chunked edg_pdf_a4 edg_html edg_chm 
105
106 # validate the content
107 edg_validate:
108         @ echo --- VALIDATING XML ---
109         $(XMLLINT) --valid --noout developer-guide.xml
110
111 # create html single page file
112 edg_html:
113         @ echo --- HTML SINGLE PAGE ---
114         mkdir -p edg_html
115         mkdir -p edg_html/graphics
116         mkdir -p edg_html/graphics/toolbar
117         cp ./graphics/*.* edg_html/graphics
118         cp ./graphics/toolbar/*.* edg_html/graphics/toolbar
119         $(XSLTPROC) --nonet $(DOCBOOKXSL)/html/docbook.xsl developer-guide.xml > edg_html/developer-guide.html
120         
121 # create html chunked page files
122 edg_html_chunked: images
123         @ echo --- HTML CHUNKED ---
124         mkdir -p edg_html_chunked
125         mkdir -p edg_html_chunked/graphics
126         mkdir -p edg_html_chunked/graphics/toolbar
127         cp ./graphics/*.* edg_html_chunked/graphics
128         cp ./graphics/toolbar/*.* edg_html_chunked/graphics/toolbar
129         $(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
130
131 # create pdf file (through XSL-FO), portrait pages on US letter paper (the default)
132 # you will get lot's of errors, but that's ok
133 edg_pdf_us: images
134 if HAVE_FOP
135         @ echo --- PDF US PAPER ---
136         $(XSLTPROC) --nonet custom_layer_pdf.xsl $(DOCBOOKXSL)/fo/docbook.xsl developer-guide.xml > developer-guide.fo
137         $(FOP) developer-guide.fo developer-guide.pdf
138 endif
139
140 # create pdf file (through XSL-FO), portrait pages on A4 paper
141 # you will get lot's of errors, but that's ok
142 edg_pdf_a4: images
143 if HAVE_FOP
144         @ echo --- PDF A4 PAPER ---
145         $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl developer-guide.xml > developer-guide.fo
146         $(FOP) developer-guide.fo developer-guide.pdf
147 endif
148
149 # create MS html help file (through html chunked pages)
150 edg_chm: images
151 if HAVE_HHC
152         @ echo --- MICROSOFT HTML HELP ---
153         mkdir -p edg_chm
154         mkdir -p edg_chm/graphics
155         mkdir -p edg_chm/graphics/toolbar
156         cp ./graphics/*.* edg_chm/graphics
157         cp ./graphics/toolbar/*.* edg_chm/graphics/toolbar
158         $(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
159         -$(HHC) htmlhelp.hhp
160         mv htmlhelp.chm developer-guide.chm
161         rm -r htmlhelp.hhp
162         rm -r toc.hhc
163 endif
164