blob: dcccb5f6a0017eb8fba6082dc888f814674750c7 [file] [log] [blame]
njn3e986b22004-11-30 10:43:45 +00001
sewardj49fbe602005-07-25 17:58:48 +00002Valgrind Documentation
3----------------------
4This text assumes the following directory structure:
5
sewardj7fd59fc2005-11-17 18:04:58 +00006Distribution text files (eg. AUTHORS, NEWS, ...):
sewardj49fbe602005-07-25 17:58:48 +00007 valgrind/
8
9Main /docs/ dir:
10 valgrind/docs/
11
12Top-level XML files:
13 valgrind/docs/xml/
14
15Tool specific XML docs:
16 valgrind/<toolname>/docs/
17
18All images used in the docs:
19 valgrind/docs/images/
20
njn3e986b22004-11-30 10:43:45 +000021Stylesheets, catalogs, parsing/formatting scripts:
22 valgrind/docs/lib/
23
24Some files of note:
debad57fc2005-12-03 22:33:29 +000025 docs/xml/index.xml: Top-level book-set wrapper
26 docs/xml/FAQ.xml: The FAQ
27 docs/valgrind-manpage.xml The valgrind manpage
28 docs/xml/vg-entities.xml: Various strings, dates etc. used all over
29 docs/xml/xml_help.txt: Basic guide to common XML tags.
njn3e986b22004-11-30 10:43:45 +000030
njnf7c00b12005-07-19 21:46:19 +000031The docs/internals directory contains some useful high-level stuff about
32Valgrind's internals. It's not relevant for the rest of this discussion.
njn3e986b22004-11-30 10:43:45 +000033
de91baf952005-11-29 17:42:50 +000034
njn3e986b22004-11-30 10:43:45 +000035Overview
36---------
debad57fc2005-12-03 22:33:29 +000037The Documentation Set contains all books, articles, manpages,
njn3e986b22004-11-30 10:43:45 +000038etc. pertaining to Valgrind, and is designed to be built as:
39- chunked html files
40- PDF file
41- PS file
debad57fc2005-12-03 22:33:29 +000042- manpage
njn3e986b22004-11-30 10:43:45 +000043
44The whole thing is a "book set", made up of multiple books (the user
45manual, the FAQ, the tech-docs, the licenses). Each book could be
46made individually, but the build system doesn't do that.
47
48CSS: the style-sheet used by the docs is the same as that used by the
49website (consistency is king). It might be worth doing a pre-build diff
50to check whether the website stylesheet has changed.
51
52
53The build process
54-----------------
55It's not obvious exactly when things get built, and so on. Here's an
56overview:
57
58- The HTML docs can be built manually by running 'make html-docs' in
59 valgrind/docs/. (Don't use 'make html'; that is a valid built-in
60 automake target, but does nothing.) Likewise for PDF/PS with 'make
61 print-docs'.
62
sewardj8bc09dc2005-07-25 17:54:06 +000063- 'make dist' (nb: at the top level, not in docs/) puts the XML files
64 into the tarball. It also builds the HTML docs and puts them in too,
65 in valgrind/docs/html/ (including style sheets, images, etc).
njn3e986b22004-11-30 10:43:45 +000066
67- 'make install' installs the HTML docs in
68 $(install)/share/doc/valgrind/html/, if they are present. (They will
69 be present if you are installing from the result of a 'make dist'.
70 They might not be present if you are developing in a Subversion
71 workspace and have not built them.) It doesn't install the XML docs,
72 as they're not useful installed.
73
74If the XML processing tools ever mature enough to become standard, we
75could just build the docs from XML when doing 'make install', which
76would be simpler.
77
78
79The XML Toolchain
80------------------
81I spent some time on the docbook-apps list in order to ascertain
82the most-useful / widely-available / least-fragile / advanced
83toolchain. Basically, everything has problems of one sort or
84another, so I ended up going with what I felt was the
85least-problematical of the various options.
86
87The maintainer is responsible for ensure the following tools are
88present on his system:
de91baf952005-11-29 17:42:50 +000089- xmllint: using libxml version 20620
90- xsltproc: Using libxml 20620, libxslt 10114 and libexslt 812
91 (Nb:be sure to use a version based on libxml2
92 version 2.6.11 or later. There was a bug in
93 xml:base processing in versions before that.)
94- pdfxmltex: pdfeTeX 3.141592-1.21a-2.2 (Web2C 7.5.4)
95- pdftops: version 3.00
96- DocBook: version 4.2
97- bzip2
njn3e986b22004-11-30 10:43:45 +000098
99A big problem is latency. Norman Walsh is constantly updating
100DocBook, but the tools tend to lag behind somewhat. It is
101important that the versions get on with each other. If you
102decide to upgrade something, then it is your responsibility to
103ascertain whether things still work nicely - this *cannot* be
104assumed.
105
106Print output: if make expires with an error, cat output.
107If you see something like this:
108 ! TeX capacity exceeded, sorry [pool size=436070]
109
110then look at this:
111 http://lists.debian.org/debian-doc/2003/12/msg00020.html
112and modify your texmf files accordingly.
113
114
de91baf952005-11-29 17:42:50 +0000115
sewardj7fd59fc2005-11-17 18:04:58 +0000116Catalog/Stylesheet Location
117---------------------------
de91baf952005-11-29 17:42:50 +0000118/etc/xml/ seems to have become the standard place for catalogs
119in recent distros.
njn3e986b22004-11-30 10:43:45 +0000120
121
njnff0c4522009-05-18 23:11:49 +0000122Notes [May 2009]
123-----------------
njn40ad2662009-08-06 01:26:14 +0000124For Ubuntu 9.04, to build HTML docs I had to:
njnff0c4522009-05-18 23:11:49 +0000125
126 sudo apt-get install docbook docbook-xsl
127
128Actually, I'm not sure if the 'docbook' is necessary, but 'docbook-xsl'
129definitely is.
130
njn40ad2662009-08-06 01:26:14 +0000131To build the man pages I also had to change the value of XSL_MAN_STYLE from this:
njnff0c4522009-05-18 23:11:49 +0000132
133 /usr/share/xml/docbook/stylesheet/nwalsh/current/manpages/docbook.xsl
134
135to this:
136
137 /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl
138
njn40ad2662009-08-06 01:26:14 +0000139I haven't succeeded in building the print docs.
140
sewardj429d5392007-03-08 19:56:58 +0000141Notes [Mar. 2007]
sewardj429eb992006-12-10 02:58:27 +0000142-----------------
sewardj429d5392007-03-08 19:56:58 +0000143For SuSE 10.1, I have to install the following packages to get a
144working toolchain. Non-indented ones I asked YaST to install;
145indented ones are extras it added on:
146
147docbook_4
148 iso_ent
149 xmlcharent
150docbook-dsssl-stylesheets
151 docbook_3
152docbook-xsl-stylesheets
153xmltex
154 gd
155 latex-ucs
156 te_latex
157 tetex
158 xaw3d
159passivetex
sewardjeb0d3322007-11-07 01:10:42 +0000160xpdf
161 xpdf-tools
sewardj429d5392007-03-08 19:56:58 +0000162
sewardj429eb992006-12-10 02:58:27 +0000163pdfxmltex still bombs when building the print docs. On SuSE 10.1 I
164edited /etc/texmf/web2c/texmf.cnf and changed
165 pool_size.pdfxmltex = 500000
166to
167 pool_size.pdfxmltex = 1500000
168and that fixes it.
169
sewardje01c5052007-11-25 00:56:51 +0000170It is also reported that the print docs build OK on Fedora Core 5.
171
sewardj7fd59fc2005-11-17 18:04:58 +0000172
debad57fc2005-12-03 22:33:29 +0000173Notes [Nov. 2005]
sewardj7fd59fc2005-11-17 18:04:58 +0000174-----------------
debad57fc2005-12-03 22:33:29 +0000175After upgrading to Suse 10, found a (known) bug in PassiveTex which
176broke the build, so added a bug-fix to 'docs/lib/vg-fo.xsl'.
177Bug-fix related links:
178http://lists.oasis-open.org/archives/docbook/200509/msg00032.html
179http://www.dpawson.co.uk/docbook/tools.html#d850e300
180http://www.haskell.org/pipermail/glasgow-haskell-bugs/2005-January.txt
de91baf952005-11-29 17:42:50 +0000181
njn3e986b22004-11-30 10:43:45 +0000182
sewardj7fd59fc2005-11-17 18:04:58 +0000183Notes [July 2005]
184-----------------
185jrs had to install zillions of packages on SuSE 9.2 in order to
186build the print docs (make print-docs), including
187 passivetex
188 xpdf (for pdftops, which does the nicest job)
189
190Even then, pdfxmltex eventually dies with "TeX capacity exceeded,
191sorry [pool size = 67555]" or some such. To fix this, he edited
192/etc/texmf/texmf.cnf and changed
193 pool_size.pdfxmltex = 500000
de91baf952005-11-29 17:42:50 +0000194to
195 pool_size.pdfxmltex = 1500000
196and that fixed it.
sewardj7fd59fc2005-11-17 18:04:58 +0000197
198
debad57fc2005-12-03 22:33:29 +0000199Notes [Nov. 2004]:
sewardj7fd59fc2005-11-17 18:04:58 +0000200-----------------
debad57fc2005-12-03 22:33:29 +0000201- the end of file.xml must have only ONE newline after the last tag:
202 </book>
203- pdfxmltex barfs if given a filename with an underscore in it
sewardj7fd59fc2005-11-17 18:04:58 +0000204
205
njn3e986b22004-11-30 10:43:45 +0000206References:
207----------
208- samba have got all the stuff
209http://websvn.samba.org/listing.php?rep=4&path=/trunk/&opt=dir&sc=1
210
211excellent on-line howto reference:
212- http://www.cogent.ca/
213
214using automake with docbook:
215- http://www.movement.uklinux.net/docs/docbook-autotools/index.html
216
217Debugging catalog processing:
218- http://xmlsoft.org/catalog.html#Declaring
219 xmlcatalog -v <catalog-file>
220
221shell script to generate xml catalogs for docbook 4.1.2:
222- http://xmlsoft.org/XSLT/docbook.html
223
224configure.in re pdfxmltex
225- http://cvs.sourceforge.net/viewcvs.py/logreport/service/configure.in?rev=1.325
226
227some useful xls stylesheets in cvs:
228- http://cvs.sourceforge.net/viewcvs.py/perl-xml/perl-xml-faq/
229
230
njn0ce9da22004-11-30 14:08:24 +0000231TODO LESS CRUCIAL:
232------------------
njn3e986b22004-11-30 10:43:45 +0000233- concat titlepage + subtitle page in fo output
debad57fc2005-12-03 22:33:29 +0000234- try and get the QuickStart and FAQ titlepage+toc+content onto one page