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