make sure all API gets built sync .c with .h
[platform/upstream/gstreamer.git] / docs / README
1 GStreamer documentation notes
2
3 IMPORTANT
4 =========
5
6 Please make sure you've read and understood everything in this file
7 before you try changing documentation.
8
9 OVERVIEW
10 ========
11
12 GStreamer has two sets of documentation that we maintain:
13 * API references, using gtk-doc (gstreamer, gstreamer-libs)
14 * "books", using DocBook/XML (faq, manual, pwg)
15
16 DOCBOOK NOTES
17 =============
18
19 OK, I've grown so tired of having to coax the docs to build every time I
20 get round to it that I've decided to note down some of the things that
21 are important to know.
22
23 OVERVIEW
24 --------
25 * Our documentation should all be Docbook/XML.  No SGML.
26 * The source for the documentation is:
27   - one or more .xml files, with the main one being gstreamer-(whatever).xml
28   - image files
29     - in .fig
30     - in .png (and maybe others)
31 * We want to generate docs in HTML, PS and PDF
32 * We want to use xmlto to generate these
33
34 CONVENTIONS
35 -----------
36 We stick to some simple conventions for writing docbook documentation.
37 * id names:
38   - all id's start with chapter-, part-, section-, or misc-
39   - verify this is the case by looking at the generated file names in html/
40   - sections should also include the chapter name;
41     for example in a chapter called chapter-example, a section would be
42     called section-example-hello-world
43
44 HOW IMAGES ARE HANDLED
45 ----------------------
46 * the format of images used is:
47   - PNG for html
48   - EPS for ps
49   - PDF for pdf
50
51 * images may need to be converted from their source format to the end format
52
53 * a file called image.entities is generated that provides two entities:
54   ℑ and ℑ
55   ℑ is the file extension (png, ps, pdf)
56 * all generated images will be put in images/
57
58 HOW THE BUILD WORKS FOR EACH FORMAT
59 -----------------------------------
60 * HTML:
61   - xmlto html gstreamer-whatever.xml should produce the html docs.
62   - We do this in the html subdir of the doc builddir.
63   - images are copied to (builddir)/html/images
64   - PNGS should be set to all of the png's referenced for html, both
65     already there and auto-generated
66
67 * PS :
68   - images are converted to .ps files in EPS format.  Generated images are
69     put in images/
70   - xmlto ps gstreamer-whatever.xml generates the ps file
71
72 * PDF :
73   There are two ways:
74   - ps2pdf is the easiest
75   - we specify ps, PS as the image type, but using xmlto the build will fail
76     because it uses ps2pdf internally and it fails to generate the images
77     By hand-generating .pdf images before xmlto we can make the build succeed.
78     (This is why image-pdf has file ext pdf but type EPS; this tricks xmlto in
79      doing the right thing)
80     xmlto pdf gstreamer-whatever.xml generates pdf (but seems to fail on the
81     FAQ, so for now we use ps2pdf)
82
83 HOW THE BUILD SYSTEM IS SET UP
84 ------------------------------
85 * make all should build html, ps, and pdf
86 * html is built in a subdir, with the png/ps images copied there
87 * ps and pdf are built in the current dir, in one file
88
89
90 GTK-DOC NOTES
91 =============
92
93 * files under CVS control:
94   - Makefile.am
95   - gstreamer-sections.txt, gstreamer.types.in, gstreamer-docs.sgml
96   - tmpl/
97   (FIXME: describe what each of these files do)
98
99 * what to do when adding a new piece of API:
100   - add both an entity and use the entity in gstreamer-docs.sgml
101   - add a new section to gstreamer-sections.txt
102   - add all documented symbols to gstreamer-sections.txt in the proper section
103 * checklist:
104   - make sure -sections.txt has a <TITLE> set for each <FILE>
105
106 * what happens during a gtk-doc build ?
107   - headers are scanned based on $(MODULE).types
108     $(MODULE)-scan is created
109     gtkdoc-scan is called with a sourcedir and a module name,
110     where the module name is  $(MODULE)
111     $(MODULE)-sections.txt is created if it doesn't exist yet (it should),
112     as well as $(MODULE)-decl.txt and $(MODULE)-decl-list.txt
113     
114     and .args, .hierarchy and .signals files are created
115     gtkdoc-scan is called 
116
117   (FIXME: why is there gstreamer.types.in and gst-plugins.types.in ?)
118
119
120 WBSITE DOCUMENTATION
121 ====================
122
123 Updating the online documentation is pretty simple.
124 Make sure that you
125 a) have a working freedesktop.org account
126 b) $HOME/.ssh/config set up so that it has the right User for the Host
127    (for example, I have:
128 Host freedesktop.org
129   User thomasvs
130 c) verify this works by doing ssh freedesktop.org and being logged in without
131    a password prompt
132 d) have verified your changes build documentation locally.
133
134 Then, after updating any of the docs, run "make upload" from that directory.
135 Or, run "make upload" from this (docs) directory.
136
137 RANDOM THINGS I'VE LEARNED
138 ==========================
139
140 * for clean builddir != srcdir separation, I wanted to use xmlto --searchpath
141   so the source xml could find the built entity file.
142   But xmlto --searchpath is (right now) for TeX input, not xml input.
143   xsltproc has a --path option (that xmlto doesn't use yet), but it
144   resolves single files to $(specified_path)/$(srcdir)/$(file)
145   For now, we need to hack around it by copying xml to the build dir.