blob: 5bd22c5b7ebe559a2673ea4bd1ec55e08a230470 [file] [log] [blame]
njn3e986b22004-11-30 10:43:45 +00001Valgrind Documentation
2----------------------
3This text assumes the following directory structure:
4
5Distribution text files (eg. README):
6 valgrind/
7
8Main /docs/ dir:
9 valgrind/docs/
10
11Top-level XML files:
12 valgrind/docs/xml/
13
14Tool specific XML docs:
15 valgrind/<toolname>/docs/
16
17All images used in the docs:
18 valgrind/docs/images/
19
sewardj8bc09dc2005-07-25 17:54:06 +000020New notes, JRS 20050727
21~~~~~~~~~~~~~~~~~~~~~~~
22* I had to install zillions of packages on SuSE 9.2 in order to
23 build the print docs (make print-docs), including
24
25 passivetex
26 xpdf (for pdftops)
27
28 It's possible to use pdf2ps instead, but that seems to generate
29 huge and almost-unreadable .ps. pdftops does a much nicer job.
30
31
32* Even then, pdfxmltex eventually dies with "TeX capacity exceeded,
33 sorry [pool size = 67555]" or some such. To fix this, I edited
34 /etc/texmf/texmf.cnf and changed
35
36 pool_size.pdfxmltex = 500000
37
38 to 1500000 and that fixed it.
39
40
41Old notes
42~~~~~~~~~
njn3e986b22004-11-30 10:43:45 +000043Stylesheets, catalogs, parsing/formatting scripts:
44 valgrind/docs/lib/
45
46Some files of note:
47 docs/xml/index.xml: Top-level book-set wrapper
48 docs/xml/FAQ.xml: The FAQ
49 docs/xml/vg-entities.xml: Various strings, dates etc. used all over
50 docs/xml/xml_help.txt: Basic guide to common XML tags.
51
njnf7c00b12005-07-19 21:46:19 +000052The docs/internals directory contains some useful high-level stuff about
53Valgrind's internals. It's not relevant for the rest of this discussion.
njn3e986b22004-11-30 10:43:45 +000054
55Overview
56---------
57The Documentation Set contains all books, articles,
58etc. pertaining to Valgrind, and is designed to be built as:
59- chunked html files
60- PDF file
61- PS file
62
63The whole thing is a "book set", made up of multiple books (the user
64manual, the FAQ, the tech-docs, the licenses). Each book could be
65made individually, but the build system doesn't do that.
66
67CSS: the style-sheet used by the docs is the same as that used by the
68website (consistency is king). It might be worth doing a pre-build diff
69to check whether the website stylesheet has changed.
70
71
72The build process
73-----------------
74It's not obvious exactly when things get built, and so on. Here's an
75overview:
76
77- The HTML docs can be built manually by running 'make html-docs' in
78 valgrind/docs/. (Don't use 'make html'; that is a valid built-in
79 automake target, but does nothing.) Likewise for PDF/PS with 'make
80 print-docs'.
81
sewardj8bc09dc2005-07-25 17:54:06 +000082- 'make dist' (nb: at the top level, not in docs/) puts the XML files
83 into the tarball. It also builds the HTML docs and puts them in too,
84 in valgrind/docs/html/ (including style sheets, images, etc).
njn3e986b22004-11-30 10:43:45 +000085
86- 'make install' installs the HTML docs in
87 $(install)/share/doc/valgrind/html/, if they are present. (They will
88 be present if you are installing from the result of a 'make dist'.
89 They might not be present if you are developing in a Subversion
90 workspace and have not built them.) It doesn't install the XML docs,
91 as they're not useful installed.
92
93If the XML processing tools ever mature enough to become standard, we
94could just build the docs from XML when doing 'make install', which
95would be simpler.
96
97
98The XML Toolchain
99------------------
100I spent some time on the docbook-apps list in order to ascertain
101the most-useful / widely-available / least-fragile / advanced
102toolchain. Basically, everything has problems of one sort or
103another, so I ended up going with what I felt was the
104least-problematical of the various options.
105
106The maintainer is responsible for ensure the following tools are
107present on his system:
108- xmllint: using libxml version 20607
109- xsltproc: using libxml 20607, libxslt 10102 and libexslt 802
110 (Nb:be sure to use a version based on libxml2
111 version 2.6.11 or later. There was a bug in
112 xml:base processing in versions before that.)
113- pdfxmltex: pdfTeX (Web2C 7.4.5) 3.14159-1.10b
114- pdftops: version 3.00
115- DocBook: version 4.2
116- bzip2
117- lynx
118
119A big problem is latency. Norman Walsh is constantly updating
120DocBook, but the tools tend to lag behind somewhat. It is
121important that the versions get on with each other. If you
122decide to upgrade something, then it is your responsibility to
123ascertain whether things still work nicely - this *cannot* be
124assumed.
125
126Print output: if make expires with an error, cat output.
127If you see something like this:
128 ! TeX capacity exceeded, sorry [pool size=436070]
129
130then look at this:
131 http://lists.debian.org/debian-doc/2003/12/msg00020.html
132and modify your texmf files accordingly.
133
134
135Catalog Locations
136------------------
137oasis:
138http://www.oasis-open.org/docbook/xml/4.2/catalog.xml
139http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd
140
141Suse 9.1:
142/usr/share/xml/docbook/ stylesheet/nwalsh/1.64.1/html/docbook.xsl
143/usr/share/xml/docbook/ schema/dtd/4.2/docbookx.dtd
144/usr/share/xml/docbook/ schema/dtd/4.2/catalog.xml
145
146
147Notes:
148------
149- the end of file.xml must have only ONE newline after the last tag:
150 </book>
151
152- pdfxmltex barfs if given a filename with an underscore in it
153
154
155References:
156----------
157- samba have got all the stuff
158http://websvn.samba.org/listing.php?rep=4&path=/trunk/&opt=dir&sc=1
159
160excellent on-line howto reference:
161- http://www.cogent.ca/
162
163using automake with docbook:
164- http://www.movement.uklinux.net/docs/docbook-autotools/index.html
165
166Debugging catalog processing:
167- http://xmlsoft.org/catalog.html#Declaring
168 xmlcatalog -v <catalog-file>
169
170shell script to generate xml catalogs for docbook 4.1.2:
171- http://xmlsoft.org/XSLT/docbook.html
172
173configure.in re pdfxmltex
174- http://cvs.sourceforge.net/viewcvs.py/logreport/service/configure.in?rev=1.325
175
176some useful xls stylesheets in cvs:
177- http://cvs.sourceforge.net/viewcvs.py/perl-xml/perl-xml-faq/
178
179
njn0ce9da22004-11-30 14:08:24 +0000180TODO CRUCIAL:
181-------------
182- PS/PDF doesn't work because Latex runs out of memory
183- Need to generate text FAQ from the valgrind/docs/xml/FAQ.xml (done at 'make
184 dist' time along with the HTML docs using the "dist-hook"), and remove the
185 old text FAQ which is in valgrind/.
186
187TODO LESS CRUCIAL:
188------------------
njn2777d932004-11-30 14:10:13 +0000189- add the HOWTO doc?
njn12bb6d42004-11-30 14:09:22 +0000190- writing-tools.xml refers to vg-catalog.xml but it's not in the repo... should
191 it be, and if so, how should it be used?
njn3e986b22004-11-30 10:43:45 +0000192- get rid of blank pages in fo output
193- concat titlepage + subtitle page in fo output
194- generate an index for the user manual (??)
njn3e986b22004-11-30 10:43:45 +0000195- run through and check for not-linked hrefs: grep on 'http'
196- run through and check for bad email addresses: grep on '@' etc.
197- when we move to svn, change all refs to sourceforge.cvs
198- go through and wrap refs+addresses in '<address>' tags
199
200