blob: 57cafd3c02fe3bd65c2165528f412a537ff45ed1 [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
20Stylesheets, catalogs, parsing/formatting scripts:
21 valgrind/docs/lib/
22
23Some files of note:
24 docs/xml/index.xml: Top-level book-set wrapper
25 docs/xml/FAQ.xml: The FAQ
26 docs/xml/vg-entities.xml: Various strings, dates etc. used all over
27 docs/xml/xml_help.txt: Basic guide to common XML tags.
28
njnf7c00b12005-07-19 21:46:19 +000029The docs/internals directory contains some useful high-level stuff about
30Valgrind's internals. It's not relevant for the rest of this discussion.
njn3e986b22004-11-30 10:43:45 +000031
32Overview
33---------
34The Documentation Set contains all books, articles,
35etc. pertaining to Valgrind, and is designed to be built as:
36- chunked html files
37- PDF file
38- PS file
39
40The whole thing is a "book set", made up of multiple books (the user
41manual, the FAQ, the tech-docs, the licenses). Each book could be
42made individually, but the build system doesn't do that.
43
44CSS: the style-sheet used by the docs is the same as that used by the
45website (consistency is king). It might be worth doing a pre-build diff
46to check whether the website stylesheet has changed.
47
48
49The build process
50-----------------
51It's not obvious exactly when things get built, and so on. Here's an
52overview:
53
54- The HTML docs can be built manually by running 'make html-docs' in
55 valgrind/docs/. (Don't use 'make html'; that is a valid built-in
56 automake target, but does nothing.) Likewise for PDF/PS with 'make
57 print-docs'.
58
59- 'make dist' puts the XML files into the tarball. It also builds the
60 HTML docs and puts them in too, in valgrind/docs/html/ (including
61 style sheets, images, etc).
62
63- 'make install' installs the HTML docs in
64 $(install)/share/doc/valgrind/html/, if they are present. (They will
65 be present if you are installing from the result of a 'make dist'.
66 They might not be present if you are developing in a Subversion
67 workspace and have not built them.) It doesn't install the XML docs,
68 as they're not useful installed.
69
70If the XML processing tools ever mature enough to become standard, we
71could just build the docs from XML when doing 'make install', which
72would be simpler.
73
74
75The XML Toolchain
76------------------
77I spent some time on the docbook-apps list in order to ascertain
78the most-useful / widely-available / least-fragile / advanced
79toolchain. Basically, everything has problems of one sort or
80another, so I ended up going with what I felt was the
81least-problematical of the various options.
82
83The maintainer is responsible for ensure the following tools are
84present on his system:
85- xmllint: using libxml version 20607
86- xsltproc: using libxml 20607, libxslt 10102 and libexslt 802
87 (Nb:be sure to use a version based on libxml2
88 version 2.6.11 or later. There was a bug in
89 xml:base processing in versions before that.)
90- pdfxmltex: pdfTeX (Web2C 7.4.5) 3.14159-1.10b
91- pdftops: version 3.00
92- DocBook: version 4.2
93- bzip2
94- lynx
95
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
112Catalog Locations
113------------------
114oasis:
115http://www.oasis-open.org/docbook/xml/4.2/catalog.xml
116http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd
117
118Suse 9.1:
119/usr/share/xml/docbook/ stylesheet/nwalsh/1.64.1/html/docbook.xsl
120/usr/share/xml/docbook/ schema/dtd/4.2/docbookx.dtd
121/usr/share/xml/docbook/ schema/dtd/4.2/catalog.xml
122
123
124Notes:
125------
126- the end of file.xml must have only ONE newline after the last tag:
127 </book>
128
129- pdfxmltex barfs if given a filename with an underscore in it
130
131
132References:
133----------
134- samba have got all the stuff
135http://websvn.samba.org/listing.php?rep=4&path=/trunk/&opt=dir&sc=1
136
137excellent on-line howto reference:
138- http://www.cogent.ca/
139
140using automake with docbook:
141- http://www.movement.uklinux.net/docs/docbook-autotools/index.html
142
143Debugging catalog processing:
144- http://xmlsoft.org/catalog.html#Declaring
145 xmlcatalog -v <catalog-file>
146
147shell script to generate xml catalogs for docbook 4.1.2:
148- http://xmlsoft.org/XSLT/docbook.html
149
150configure.in re pdfxmltex
151- http://cvs.sourceforge.net/viewcvs.py/logreport/service/configure.in?rev=1.325
152
153some useful xls stylesheets in cvs:
154- http://cvs.sourceforge.net/viewcvs.py/perl-xml/perl-xml-faq/
155
156
njn0ce9da22004-11-30 14:08:24 +0000157TODO CRUCIAL:
158-------------
159- PS/PDF doesn't work because Latex runs out of memory
160- Need to generate text FAQ from the valgrind/docs/xml/FAQ.xml (done at 'make
161 dist' time along with the HTML docs using the "dist-hook"), and remove the
162 old text FAQ which is in valgrind/.
163
164TODO LESS CRUCIAL:
165------------------
njn2777d932004-11-30 14:10:13 +0000166- add the HOWTO doc?
njn12bb6d42004-11-30 14:09:22 +0000167- writing-tools.xml refers to vg-catalog.xml but it's not in the repo... should
168 it be, and if so, how should it be used?
njn3e986b22004-11-30 10:43:45 +0000169- get rid of blank pages in fo output
170- concat titlepage + subtitle page in fo output
171- generate an index for the user manual (??)
njn3e986b22004-11-30 10:43:45 +0000172- run through and check for not-linked hrefs: grep on 'http'
173- run through and check for bad email addresses: grep on '@' etc.
174- when we move to svn, change all refs to sourceforge.cvs
175- go through and wrap refs+addresses in '<address>' tags
176
177