blob: 64ac345c290a852e9bb963597aedc1a87a0c8549 [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:
25 docs/xml/index.xml: Top-level book-set wrapper
26 docs/xml/FAQ.xml: The FAQ
27 docs/xml/vg-entities.xml: Various strings, dates etc. used all over
28 docs/xml/xml_help.txt: Basic guide to common XML tags.
29
njnf7c00b12005-07-19 21:46:19 +000030The docs/internals directory contains some useful high-level stuff about
31Valgrind's internals. It's not relevant for the rest of this discussion.
njn3e986b22004-11-30 10:43:45 +000032
de91baf952005-11-29 17:42:50 +000033
njn3e986b22004-11-30 10:43:45 +000034Overview
35---------
36The Documentation Set contains all books, articles,
37etc. pertaining to Valgrind, and is designed to be built as:
38- chunked html files
39- PDF file
40- PS file
41
42The whole thing is a "book set", made up of multiple books (the user
43manual, the FAQ, the tech-docs, the licenses). Each book could be
44made individually, but the build system doesn't do that.
45
46CSS: the style-sheet used by the docs is the same as that used by the
47website (consistency is king). It might be worth doing a pre-build diff
48to check whether the website stylesheet has changed.
49
50
51The build process
52-----------------
53It's not obvious exactly when things get built, and so on. Here's an
54overview:
55
56- The HTML docs can be built manually by running 'make html-docs' in
57 valgrind/docs/. (Don't use 'make html'; that is a valid built-in
58 automake target, but does nothing.) Likewise for PDF/PS with 'make
59 print-docs'.
60
sewardj8bc09dc2005-07-25 17:54:06 +000061- 'make dist' (nb: at the top level, not in docs/) puts the XML files
62 into the tarball. It also builds the HTML docs and puts them in too,
63 in valgrind/docs/html/ (including style sheets, images, etc).
njn3e986b22004-11-30 10:43:45 +000064
65- 'make install' installs the HTML docs in
66 $(install)/share/doc/valgrind/html/, if they are present. (They will
67 be present if you are installing from the result of a 'make dist'.
68 They might not be present if you are developing in a Subversion
69 workspace and have not built them.) It doesn't install the XML docs,
70 as they're not useful installed.
71
72If the XML processing tools ever mature enough to become standard, we
73could just build the docs from XML when doing 'make install', which
74would be simpler.
75
76
77The XML Toolchain
78------------------
79I spent some time on the docbook-apps list in order to ascertain
80the most-useful / widely-available / least-fragile / advanced
81toolchain. Basically, everything has problems of one sort or
82another, so I ended up going with what I felt was the
83least-problematical of the various options.
84
85The maintainer is responsible for ensure the following tools are
86present on his system:
de91baf952005-11-29 17:42:50 +000087- xmllint: using libxml version 20620
88- xsltproc: Using libxml 20620, libxslt 10114 and libexslt 812
89 (Nb:be sure to use a version based on libxml2
90 version 2.6.11 or later. There was a bug in
91 xml:base processing in versions before that.)
92- pdfxmltex: pdfeTeX 3.141592-1.21a-2.2 (Web2C 7.5.4)
93- pdftops: version 3.00
94- DocBook: version 4.2
95- bzip2
njn3e986b22004-11-30 10:43:45 +000096
97A big problem is latency. Norman Walsh is constantly updating
98DocBook, but the tools tend to lag behind somewhat. It is
99important that the versions get on with each other. If you
100decide to upgrade something, then it is your responsibility to
101ascertain whether things still work nicely - this *cannot* be
102assumed.
103
104Print output: if make expires with an error, cat output.
105If you see something like this:
106 ! TeX capacity exceeded, sorry [pool size=436070]
107
108then look at this:
109 http://lists.debian.org/debian-doc/2003/12/msg00020.html
110and modify your texmf files accordingly.
111
112
de91baf952005-11-29 17:42:50 +0000113
sewardj7fd59fc2005-11-17 18:04:58 +0000114Catalog/Stylesheet Location
115---------------------------
de91baf952005-11-29 17:42:50 +0000116/etc/xml/ seems to have become the standard place for catalogs
117in recent distros.
njn3e986b22004-11-30 10:43:45 +0000118
119
sewardj7fd59fc2005-11-17 18:04:58 +0000120
121Notes [Nov. 2004]:
122-----------------
njn3e986b22004-11-30 10:43:45 +0000123- the end of file.xml must have only ONE newline after the last tag:
124 </book>
njn3e986b22004-11-30 10:43:45 +0000125- pdfxmltex barfs if given a filename with an underscore in it
de91baf952005-11-29 17:42:50 +0000126
njn3e986b22004-11-30 10:43:45 +0000127
sewardj7fd59fc2005-11-17 18:04:58 +0000128Notes [July 2005]
129-----------------
130jrs had to install zillions of packages on SuSE 9.2 in order to
131build the print docs (make print-docs), including
132 passivetex
133 xpdf (for pdftops, which does the nicest job)
134
135Even then, pdfxmltex eventually dies with "TeX capacity exceeded,
136sorry [pool size = 67555]" or some such. To fix this, he edited
137/etc/texmf/texmf.cnf and changed
138 pool_size.pdfxmltex = 500000
de91baf952005-11-29 17:42:50 +0000139to
140 pool_size.pdfxmltex = 1500000
141and that fixed it.
sewardj7fd59fc2005-11-17 18:04:58 +0000142
143
144Notes [Nov. 2005]
145-----------------
146After upgrading to Suse 10, found a (known) bug in PassiveTex which
147broke the build, so added a bug-fix to 'docs/lib/vg-fo.xsl'.
148Bug-fix related links:
149http://lists.oasis-open.org/archives/docbook/200509/msg00032.html
150http://www.dpawson.co.uk/docbook/tools.html#d850e300
151http://www.haskell.org/pipermail/glasgow-haskell-bugs/2005-January.txt
152
153
njn3e986b22004-11-30 10:43:45 +0000154References:
155----------
156- samba have got all the stuff
157http://websvn.samba.org/listing.php?rep=4&path=/trunk/&opt=dir&sc=1
158
159excellent on-line howto reference:
160- http://www.cogent.ca/
161
162using automake with docbook:
163- http://www.movement.uklinux.net/docs/docbook-autotools/index.html
164
165Debugging catalog processing:
166- http://xmlsoft.org/catalog.html#Declaring
167 xmlcatalog -v <catalog-file>
168
169shell script to generate xml catalogs for docbook 4.1.2:
170- http://xmlsoft.org/XSLT/docbook.html
171
172configure.in re pdfxmltex
173- http://cvs.sourceforge.net/viewcvs.py/logreport/service/configure.in?rev=1.325
174
175some useful xls stylesheets in cvs:
176- http://cvs.sourceforge.net/viewcvs.py/perl-xml/perl-xml-faq/
177
178
njn0ce9da22004-11-30 14:08:24 +0000179TODO LESS CRUCIAL:
180------------------
njn3e986b22004-11-30 10:43:45 +0000181- concat titlepage + subtitle page in fo output
de91baf952005-11-29 17:42:50 +0000182- try and get the QuickStart and FAQ titlepages and tocs onto the same page