interchange / xmldocs

Interchange new documentation (XML source)
http://www.icdevgroup.org/
4 stars 3 forks source link

The Interchange Development Group http://www.icdevgroup.org

ICDEVGROUP Documentation Set http://git.icdevgroup.org/?p=xmldocs.git;a=tree

This is a technical look at the XMLDOCS system, and it tells you how to get the documentation generated. For XMLDOCS authoring, see file WRITING.

INTRODUCTION

The (new) Interchange XML documentation set is completely self-contained. To build the complete documentation set, just run:

make git make

Sometimes you want to build multiple versions of documentation at once (for example, one online, one offline, one profiled for Debian GNU etc.). It is possible to change OUTPUT/ directory to something else (named OUTPUT) to achieve this effect. However, places where I couldn't have inserted variables have OUTPUT/ hardcoded, so OUTPUT is still made a symbolic link to the output dir of your choice.

Here's an example:

OUTPUT=-std make skel

After that point, you can omit OUTPUT= from subsequent calls to "make" and things will still clap together nicely.

Also, it is possible to generate documentation for a specific Interchange release, such as 5.0.0 or 5.2.0. To do so, use TARGET env variable:

TARGET="5.2.0" make refxmls

Just make sure to have TARGET defined on each 'make' invocation.

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

To build specific targets, see Makefile for target names. Few useful targets would include:

-- Those that are not part of 'make' routine: make git (to create complete sources/ directory, or update existing) make clean (removes OUTPUT/) make distclean (remove OUTPUT/ and tmp/) make look-clean (clean + 'mv tmp tmp.temporary'. Useful to only make the tree as if it is clean (to perform Git operations without errors), but then automatically rename the directory back to 'tmp/' and avoid the overhead of regenerating OlinkDB files).

-- And those that are part of 'make': make skel make cache make refxmls make olinkdbs-nc olinkdbs-c make OUTPUT/xmldocs.css make tmp/iccattut-nc.db tmp/iccattut-c.db make OUTPUT/iccattut.html OUTPUT/iccattut ...

See Makefile for a complete list, of course.

PREREQUISITES

To perform a successful build, the following programs and modules must be available:

Optional Perl modules:

(Install the Twig module if if you want to syntax-check your additions by calling i.e. "bin/refs-autogen --validate git-head").

RedHat setups

If running on Red Hat and not Debian GNU, apply this patch: http://icdevgroup.org/~docelic/xmldocs-rh.diff . It allows you to get usable results, although it's flaky and Debian GNU is really the preferred platform. (I suppose with a better patch, by someone know knows Red Hat and its DocBook XML setup, Red Hat would produce completely good results too - patches welcome).

On Gentoo GNU/Linux systems, the prerequisite ebuild packages are as follows:

If running on Gentoo GNU/Linux then you will need to apply the following patch to correct the hard-coded, Debian-specific file locations:

http://icdevgroup.org/~kwalsh/xmldocs-gentoo.diff

FINAL OUTPUT

During the invocation of 'make', few files will be created:

docbook/auto*.ent - Files containing XML entities that we can use in our sources. For example, configuration directive Include is referenced simply as &conf-Include;, tag [include] is referenced simply as &tag-include;.

tmp/*.db - OLink DB files generated from source .xml files, and other, on-the-fly .xmls.

cache//* - Various Interchange source tree statistics, available over a filesystem interface. (For XInclusion in .xml sources and similar purposes). The files are generated by bin/mkreport which depends on cache//.cache.bin. cache//.cache.bin is generated by bin/stattree.

               The cache is Perl's portable Storable dump. It was
               originally kept in Git (so others could re-use it),
               but that didn't play out well in practice so now everyone
               building the docs needs to have the sources/ directory
               ready and run 'make caches' himself to get the .bin
               files generated.

OUTPUT/ - Autogenerated: directory containing the actual completely self-contained and interlinked documentation set. Once it's created, you can move it out of the build tree and package as you see fit.

               This can also be OUTPUT<yourprefix>, if you pass e.g.
               OUTPUT=-std in a call to make (as already shown above).

tmp/missing[2] - After you build the documentation, there will be a file named tmp/missing autogenerated, and it will contain a list of symbols with all the parts of the documentation they still miss for the item to be considered complete. tmp/missing2 will also be created that will list HOWTO items and glossary entries that need work.

DEVELOPMENT NOTES

The directory structure: Makefile - Main Makefile bin - Helper tools cache - Interchange source trees metadata docbook - DocBook XML support files files - Support files, such as downloadable examples etc. guides - Collection of guides refs - Collection of reference pages glossary - Collection of glossary items images - All images tmp - Scratch and temporary file space pending - A "pending" directory. If you have a chunk which you'd like to integrate in the docset, but don't have the time to prepare it yourself, just drop it in there and someone will pick it up. sources - (Not in Git.) run 'make git' to auto-create this directory with all needed contents. whatsnew - A directory containing whatsnew.xml, continuously updated what's new list. The items are added automatically; just place copies of the Git commit messages in the whatsnew/ directory; every time you run bin/whatsnew-update, it will process the files and update whatsnew.xml, which you can then push in Git.

Updating cache/: The dotfiles found in cache/ can only be generated when the sources/ directory is present as described above, and contains Interchange releases in directories named after release numbers (with the exception of "git-head"). Run 'make git' to create that sources/ directory with all the contents. Run 'make up-all' to invoke git update on all versions (or 'make up-' for specific). ('make git' can also be used to update repositories).

Leftover information, not important for standard procedure: **

To create the documentation for a yet non-existent item, your best bet is to start off by copying an existing item over.

When adding documentation entries, please favor QUALITY over QUANTITY. That means you should grep the whole Git repo for ALL information about a symbol (and supplement that with your own invaluable historical and technical information), and then write the item documentation that includes all that information. Also make sure to check the actual symbol source; at many places I've ** found undocumented options being present, and variables used or checked.

After you build the documentation, there will be a file named tmp/missing autogenerated, and it will contain a list of symbols with all the parts of the documentation they still miss for the item to be considered complete. tmp/missing2 will also be created that will list HOWTO items and glossary entries that need work. Clearing out this list is a priority; ** given that the new system is so convenient and cool, you have no excuse ;-)

Davor Ocelic, docelic@icdevgroup.org