Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 330 lines (258 sloc) 14.0 kb
eab1131 @docelic Initial revision
docelic authored
1
2 The Interchange Development Group
3 http://www.icdevgroup.org
4
5 ICDEVGROUP Documentation Set
6 http://www.icdevgroup.org/cgi-bin/cvsweb/xmldocs/
7
a0f2502 @docelic A large commit with many enhancements:
docelic authored
8 This is a technical look at the XMLDOCS system, and it tells you how to get
3e701cc @docelic - README: updates
docelic authored
9 the documentation generated. For XMLDOCS authoring, see file WRITING.
a0f2502 @docelic A large commit with many enhancements:
docelic authored
10
eab1131 @docelic Initial revision
docelic authored
11
12 INTRODUCTION
13
14 The (new) Interchange XML documentation set is completely self-contained.
afb373e @docelic - Improved Makefile completely now, for this turn
docelic authored
15 To build the complete documentation set, just run:
eab1131 @docelic Initial revision
docelic authored
16
a705400 @docelic Further s/cvs/git/ tunings
docelic authored
17 make git
eab1131 @docelic Initial revision
docelic authored
18 make
afb373e @docelic - Improved Makefile completely now, for this turn
docelic authored
19
3c0854c @docelic - three new reference pages
docelic authored
20 Sometimes you want to build multiple versions of documentation at once
21 (for example, one online, one offline, one profiled for Debian GNU etc.).
22 It is possible to change OUTPUT/ directory to something else (named
23 OUTPUT<yourstring>) to achieve this effect. However, places where I
24 couldn't have inserted variables have OUTPUT/ hardcoded, so OUTPUT is still
25 made a symbolic link to the output dir of your choice.
4a1b532 @docelic - Makefile:
docelic authored
26
27 Here's an example:
28
29 OUTPUT=-std make skel
30
31 After that point, you can omit OUTPUT= from subsequent calls to "make"
32 and things will still clap together nicely.
33
558a0d6 @docelic - Mention TARGET_RELEASE= to generate docs for specific Interchange
docelic authored
34 Also, it is possible to generate documentation for a specific Interchange
6dca116 @docelic * Few small updates, important is the introduction of manpages
docelic authored
35 release, such as 5.0.0 or 5.2.0. To do so, use TARGET env variable:
558a0d6 @docelic - Mention TARGET_RELEASE= to generate docs for specific Interchange
docelic authored
36
6dca116 @docelic * Few small updates, important is the introduction of manpages
docelic authored
37 TARGET="5.2.0" make refxmls
558a0d6 @docelic - Mention TARGET_RELEASE= to generate docs for specific Interchange
docelic authored
38
6dca116 @docelic * Few small updates, important is the introduction of manpages
docelic authored
39 Just make sure to have TARGET defined on each 'make' invocation.
558a0d6 @docelic - Mention TARGET_RELEASE= to generate docs for specific Interchange
docelic authored
40
c1660ad @docelic More clean build
docelic authored
41 ** -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- **
eab1131 @docelic Initial revision
docelic authored
42
02466d3 @docelic MODIFIED:
docelic authored
43 To build specific targets, see Makefile for target names. Few useful
44 targets would include:
45
4946375 @docelic - An easy commit to break the summer silence.
docelic authored
46 -- Those that are not part of 'make' routine:
a705400 @docelic Further s/cvs/git/ tunings
docelic authored
47 make git (to create complete sources/ directory, or update existing)
059348e @docelic - Makefile: fixes, updates
docelic authored
48 make clean (removes OUTPUT/)
49 make distclean (remove OUTPUT/ and tmp/)
f524dd8 @docelic - Updated README
docelic authored
50 make look-clean (clean + 'mv tmp tmp.temporary'. Useful to only make
059348e @docelic - Makefile: fixes, updates
docelic authored
51 the tree as if it is clean (to perform CVS operations
52 without errors), but then automatically rename
53 the directory back to 'tmp/' and avoid the overhead of
54 regenerating OlinkDB files).
55
4946375 @docelic - An easy commit to break the summer silence.
docelic authored
56 -- And those that are part of 'make':
afb373e @docelic - Improved Makefile completely now, for this turn
docelic authored
57 make skel
58 make cache
059348e @docelic - Makefile: fixes, updates
docelic authored
59 make refxmls
7d06b33 @docelic Some styling stuff.
docelic authored
60 make olinkdbs-nc olinkdbs-c
61 make OUTPUT/xmldocs.css
afb373e @docelic - Improved Makefile completely now, for this turn
docelic authored
62 make tmp/iccattut-nc.db tmp/iccattut-c.db
7d06b33 @docelic Some styling stuff.
docelic authored
63 make OUTPUT/iccattut.html OUTPUT/iccattut
4946375 @docelic - An easy commit to break the summer silence.
docelic authored
64 ...
059348e @docelic - Makefile: fixes, updates
docelic authored
65
66 See Makefile for a complete list, of course.
eab1131 @docelic Initial revision
docelic authored
67
68
69 PREREQUISITES
70
0130e5c @docelic - Make Makefile targets that depend on IC_VERSIONS non-fatal (eliminate ...
docelic authored
71 To perform a successful build, the following programs and modules
72 must be available:
eab1131 @docelic Initial revision
docelic authored
73
74 - Perl
22d6b68 @racke added make and cvs to prerequisites
racke authored
75 - Shell commands: mkdir, cp, ln, find, tar, gzip, bzip2, make
a705400 @docelic Further s/cvs/git/ tunings
docelic authored
76 - git-core
0130e5c @docelic - Make Makefile targets that depend on IC_VERSIONS non-fatal (eliminate ...
docelic authored
77 - docbook-xml
78 - docbook-xsl
eab1131 @docelic Initial revision
docelic authored
79 - xsltproc
3139e04 @docelic - guides/xmldocs.xml: guide about writing XMLDOCS (in progress)
docelic authored
80 - tetex-extra (and actually, packages it depends on)
81 - XML::Twig Perl module (if you want to call bin/refs-autogen --validate)
eab1131 @docelic Initial revision
docelic authored
82
d2c6eee @docelic - Makefile: remove dependence on bin/stattree
docelic authored
83 If running on Red Hat and not Debian GNU, apply this patch:
84 http://icdevgroup.org/~docelic/xmldocs-rh.diff . It allows you to get
85 usable results, although it's flaky and Debian GNU is really the preferred
86 platform. (I suppose with a better patch, by someone know knows Red Hat
87 and its DocBook XML setup, Red Hat would produce completely good results
4946375 @docelic - An easy commit to break the summer silence.
docelic authored
88 too - patches welcome).
d2c6eee @docelic - Makefile: remove dependence on bin/stattree
docelic authored
89
86b7c3e * Added some Gentoo-specific notes, such as a list of prerequisite
Kevin Walsh authored
90 On Gentoo GNU/Linux systems, the prerequisite ebuild packages are as follows:
91
92 - dev-lang/perl
a705400 @docelic Further s/cvs/git/ tunings
docelic authored
93 - dev-util/git
86b7c3e * Added some Gentoo-specific notes, such as a list of prerequisite
Kevin Walsh authored
94 - app-arch/gzip
95 - app-arch/bzip2
96 - app-text/docbook-xml-dtd
97 - app-text/docbook-xsl-stylesheets
98 - dev-libs/libxslt
99 - dev-util/ctags
100 - app-text/tetex
101 - dev-perl/XML-Twig
102
103 If running on Gentoo GNU/Linux then you will need to apply the following
104 patch to correct the hard-coded, Debian-specific file locations:
105
106 http://icdevgroup.org/~kwalsh/xmldocs-gentoo.diff
107
eab1131 @docelic Initial revision
docelic authored
108 FINAL OUTPUT
109
110 During the invocation of 'make', few files will be created:
afb373e @docelic - Improved Makefile completely now, for this turn
docelic authored
111
112 docbook/auto*.ent - Files containing XML entities that we can use in our
113 sources. For example, configuration directive Include is
114 referenced simply as &conf-Include;, tag [include] is
115 referenced simply as &tag-include;.
eab1131 @docelic Initial revision
docelic authored
116
09c6b9a @docelic - bin/stattree and bin/refs-autogen:
docelic authored
117 tmp/*.db - OLink DB files generated from source .xml files,
059348e @docelic - Makefile: fixes, updates
docelic authored
118 and other, on-the-fly .xmls.
02466d3 @docelic MODIFIED:
docelic authored
119
eab1131 @docelic Initial revision
docelic authored
120 cache/<ver>/* - Various Interchange source tree statistics, available
121 over a filesystem interface. (For XInclusion in .xml
122 sources and similar purposes). The files are generated
f524dd8 @docelic - Updated README
docelic authored
123 by bin/mkreport which depends on cache/<ver>/.cache.bin.
124 cache/<ver>/.cache.bin is generated by bin/stattree.
125
126 The cache is Perl's portable Storable dump. It was
127 originally kept in the CVS (so others could re-use it),
128 but that didn't play out well in practice so now everyone
129 building the docs needs to have the sources/ directory
130 ready and run 'make caches' himself to get the .bin
131 files generated.
eab1131 @docelic Initial revision
docelic authored
132
133 OUTPUT/ - Autogenerated:
134 directory containing the actual completely self-contained
135 and interlinked documentation set. Once it's created, you
136 can move it out of the build tree and package as you see
137 fit.
afb373e @docelic - Improved Makefile completely now, for this turn
docelic authored
138
139 This can also be OUTPUT<yourprefix>, if you pass e.g.
e4aa17a @docelic - Small fixes/updates to 6 existing files
docelic authored
140 OUTPUT=-std in a call to make (as already shown above).
eab1131 @docelic Initial revision
docelic authored
141
d2c6eee @docelic - Makefile: remove dependence on bin/stattree
docelic authored
142 tmp/missing[2] - After you build the documentation, there will be a file
143 named tmp/missing autogenerated, and it will contain a list
144 of symbols with all the parts of the documentation they
145 still miss for the item to be considered complete.
146 tmp/missing2 will also be created that will list HOWTO
147 items and glossary entries that need work.
148
eab1131 @docelic Initial revision
docelic authored
149
150 DEVELOPMENT NOTES
151
152 The directory structure:
153 Makefile - Main Makefile
154 bin - Helper tools
155 cache - Interchange source trees metadata
156 docbook - DocBook XML support files
02466d3 @docelic MODIFIED:
docelic authored
157 files - Support files, such as downloadable examples etc.
eab1131 @docelic Initial revision
docelic authored
158 guides - Collection of guides
159 refs - Collection of reference pages
a0f2502 @docelic A large commit with many enhancements:
docelic authored
160 glossary - Collection of glossary items
eab1131 @docelic Initial revision
docelic authored
161 images - All images
059348e @docelic - Makefile: fixes, updates
docelic authored
162 tmp - Scratch and temporary file space
02466d3 @docelic MODIFIED:
docelic authored
163 pending - A "pending" directory.
eab1131 @docelic Initial revision
docelic authored
164 If you have a chunk which you'd like to integrate in
165 the docset, but don't have the time to prepare it
166 yourself, just drop it in there and someone will pick
167 it up.
a705400 @docelic Further s/cvs/git/ tunings
docelic authored
168 sources - (not in CVS). run 'make git' to auto-create this
afb373e @docelic - Improved Makefile completely now, for this turn
docelic authored
169 directory with all needed contents.
3e701cc @docelic - README: updates
docelic authored
170 whatsnew - A directory containing whatsnew.xml, continuously updated
171 what's new list. The items are added automatically; just
172 place copies of the CVS commit messages in the whatsnew/
173 directory; every time you run bin/whatsnew-update, it will
174 process the files and update whatsnew.xml, which you can
175 then check-in (or update) in CVS.
eab1131 @docelic Initial revision
docelic authored
176
177
178 Updating cache/:
179 The dotfiles found in cache/ can only be generated when the sources/
02466d3 @docelic MODIFIED:
docelic authored
180 directory is present as described above, and contains Interchange releases
181 in directories named after release numbers (with the exception of
a705400 @docelic Further s/cvs/git/ tunings
docelic authored
182 "git-head"). Run 'make git' to create that sources/ directory with
183 all the contents. Run 'make up-all' to invoke git update on all
184 versions (or 'make up-<ver>' for specific). ('make git' can also be used
afb373e @docelic - Improved Makefile completely now, for this turn
docelic authored
185 to update repositories).
186
f524dd8 @docelic - Updated README
docelic authored
187
afb373e @docelic - Improved Makefile completely now, for this turn
docelic authored
188 ** Leftover information, not important for standard procedure: ************
189 * Once sources/ is in place, make sure all available versions are mentioned
190 * in Makefile's IC_VERSIONS variable, and then run 'make cache'.
f524dd8 @docelic - Updated README
docelic authored
191 * This will regenerate files for the versions you have.
192 *
193 * It is important to have as many releases as possible in sources/, because
194 * when you generate the documentation (reference pages most notably), the
195 * symbols there are considered "added" the first time they're encountered
196 * in the sources (so they'll appear more recent than they actually are).
afb373e @docelic - Improved Makefile completely now, for this turn
docelic authored
197 ** End of leftover information ********************************************
198
eab1131 @docelic Initial revision
docelic authored
199
0130e5c @docelic - Make Makefile targets that depend on IC_VERSIONS non-fatal (eliminate ...
docelic authored
200 When bin/mkreport runs later, it parses the .cache.bin file and produces
201 number of output files (interesting "leaf nodes" in a hash). Those
202 files are filesystem interface to tree-level statistics, and can be
203 used in numerous ways, XInclude for example.
059348e @docelic - Makefile: fixes, updates
docelic authored
204 Like: "Interchange consists of <xi:include file='.../total.files'> files".
3e701cc @docelic - README: updates
docelic authored
205 (Currently this is not available; bin/mkreport is outdated and broken, and
206 will be fixed when I come to needing it).
0130e5c @docelic - Make Makefile targets that depend on IC_VERSIONS non-fatal (eliminate ...
docelic authored
207
eab1131 @docelic Initial revision
docelic authored
208
209 The XML "preprocessor" tool:
a0f2502 @docelic A large commit with many enhancements:
docelic authored
210 There's bin/pp tool which you can use to write larger blocks of
211 XML more conveniently. See the script itself for usage notes.
eab1131 @docelic Initial revision
docelic authored
212
059348e @docelic - Makefile: fixes, updates
docelic authored
213 The "CVS CO/UP" script:
214 There's bin/coup tool that helps you manage sources/ directory.
215 See the script or the Makefile for invocation examples.
a705400 @docelic Further s/cvs/git/ tunings
docelic authored
216 ('make git' and 'make up-<ver|all>' invoke bin/coup).
059348e @docelic - Makefile: fixes, updates
docelic authored
217
eab1131 @docelic Initial revision
docelic authored
218
afb373e @docelic - Improved Makefile completely now, for this turn
docelic authored
219
02466d3 @docelic MODIFIED:
docelic authored
220 Autogeneration of the reference pages: ** IMPORTANT **
221 Creation of new documentation parts: ** IMPORTANT **
222
b377a02 @docelic - Minor improvements
docelic authored
223 When bin/stattree runs, it collects information about all the "symbols"
02466d3 @docelic MODIFIED:
docelic authored
224 in the source it can find (symbols are anything: pragmas, global variables,
059348e @docelic - Makefile: fixes, updates
docelic authored
225 functions, tags, config directives ...).
226 It collects the symbol names together with all files
02466d3 @docelic MODIFIED:
docelic authored
227 and line numbers (and few lines of context around them) where they
228 appear. This is the first step of reference pages autogeneration.
229
230 Some of the symbol information is derived from the source automatically;
231 other parts must be added manually by us.
9d547aa @racke add a warning for a trap i got into
racke authored
232
233 Please note that the symbol name must match the symbol used in the source,
234 although tags allowed to be used with two forms (dash and underscore).
02466d3 @docelic MODIFIED:
docelic authored
235
236 Let's take an example of "post_page" pragma (but the principle is the same
a0f2502 @docelic A large commit with many enhancements:
docelic authored
237 for any symbol). User-supplied information is found in either:
238
239 o refs/<symbol>/ directory, or
240 o refs/<symbol> file, where multiple sections are defined using the
241 __NAME__ <section> and __END__ tokens (similar to IC profiles ;-).
059348e @docelic - Makefile: fixes, updates
docelic authored
242 Everything outside __NAME__ <name> ... __END__ blocks is discarded
243 and can effectively be used as a comment area.
244
3e701cc @docelic - README: updates
docelic authored
245 The refs/<symbol> single-file-based approach is now preferred. It's more
afb373e @docelic - Improved Makefile completely now, for this turn
docelic authored
246 convenient, and keeps the number of files in CVS at minimum. The bin/editem
059348e @docelic - Makefile: fixes, updates
docelic authored
247 script advises to use it.
afb373e @docelic - Improved Makefile completely now, for this turn
docelic authored
248 Use refs/<symbol>/* only in special cases (which is never, or close to it).
a0f2502 @docelic A large commit with many enhancements:
docelic authored
249
250 Regardless of the way you document an item, the following information
251 is needed to consider the symbol documentation complete:
02466d3 @docelic MODIFIED:
docelic authored
252
3e701cc @docelic - README: updates
docelic authored
253 - Pieces that must be user-supplied because defaults are only placeholders:
02466d3 @docelic MODIFIED:
docelic authored
254 purpose, synopsis, description, examples, see also
a0f2502 @docelic A large commit with many enhancements:
docelic authored
255
3e701cc @docelic - README: updates
docelic authored
256 - Pieces that could be user-supplied but have meaningful default:
257 notes, bugs, authors, copyright
059348e @docelic - Makefile: fixes, updates
docelic authored
258
3e701cc @docelic - README: updates
docelic authored
259 - Autogenerated (can be overriden if really neccesary):
260 id, name, symbol type, availability, source occurences
059348e @docelic - Makefile: fixes, updates
docelic authored
261
afb373e @docelic - Improved Makefile completely now, for this turn
docelic authored
262
3e701cc @docelic - README: updates
docelic authored
263 *** Obscure information START /// Not needed in general ***
264 * All of above fields can both be overriden or appended with user-supplied
265 * information:
266 *
afb373e @docelic - Improved Makefile completely now, for this turn
docelic authored
267 *oo refs/<symbol> method (one-file, the preferred way):
3e701cc @docelic - README: updates
docelic authored
268 *
269 * To fill the template of the reference page, you add content to sections
270 * in the following way:
271 *
272 * __NAME__ section name
273 * section content
274 * __END__
275 *
276 * Over time it appeared we only want to append information and never
277 * override it, so this method does not have a way to override a value
278 * like refs/<symbol>/control (in multi-file method) can do.
279 *
afb373e @docelic - Improved Makefile completely now, for this turn
docelic authored
280 *oo refs/<symbol>/* method (one-directory, multiple-files):
3e701cc @docelic - README: updates
docelic authored
281 *
282 * To unconditionally override values and/or provide one-liner contents, use
283 * refs/<symbol>/control file. It has pretty much inflexible
284 * "field: content" line format, but # comments can be used.
285 *
286 * To append with information, you use refs/<symbol>/<X>, where <X> is
287 * the name of an existing section, maybe followed by an arbitrary string.
288 * With the exception of example files, you generally only create one
289 * file for each section.
290 * To supply more examples, you could keep them in an informal structure
291 * like this:
292 * refs/post_page/example
293 * refs/post_page/example2
294 * refs/post_page/example-relative_pages
295 * refs/post_page/example:used-often
296 * refs/post_page/example.something
297 *
298 * (also, nothing prevents you from having more <example>s in the same file
299 * if you like).
300 *
301 * You can't use # comments in the non-control files (they'd be left as-is),
302 * but you can use XML comments <!-- commented section -->.
303 * To avoid having to escape all HTML entities and everything, simply
304 * enclose "dirty" blocks in <![CDATA[ ... ]]>.
305 *** Obscure information END /// Not needed in general ***
a0f2502 @docelic A large commit with many enhancements:
docelic authored
306
307
17ab073 @docelic * Some bringing up to date
docelic authored
308 ** To create the documentation for a yet non-existent item, your best bet
afb373e @docelic - Improved Makefile completely now, for this turn
docelic authored
309 ** is to start off by copying an existing item over.
02466d3 @docelic MODIFIED:
docelic authored
310
311 ** When adding documentation entries, please favor QUALITY over QUANTITY.
312 ** That means you should grep the whole CVS for ALL information about a
313 ** symbol (and supplement that with your own invaluable historical and
314 ** technical information), and then write the item documentation that
315 ** includes all that information.
3e701cc @docelic - README: updates
docelic authored
316 ** Also make sure to check the actual symbol source; at many places I've
317 ** found undocumented options being present, and variables used or checked.
02466d3 @docelic MODIFIED:
docelic authored
318
c8b5f11 @docelic - Makefile: make distclean is now quiet as it should be
docelic authored
319 ** After you build the documentation, there will be a file named
320 ** tmp/missing autogenerated, and it will contain a list of symbols with all
321 ** the parts of the documentation they still miss for the item to be
d2c6eee @docelic - Makefile: remove dependence on bin/stattree
docelic authored
322 ** considered complete. tmp/missing2 will also be created that will list
323 ** HOWTO items and glossary entries that need work.
324 ** Clearing out this list is a priority;
c8b5f11 @docelic - Makefile: make distclean is now quiet as it should be
docelic authored
325 ** given that the new system is so convenient and cool, you have no excuse ;-)
326
eab1131 @docelic Initial revision
docelic authored
327
328 Davor Ocelic, docelic@icdevgroup.org
329
Something went wrong with that request. Please try again.