Build and Writing Guide for libstdc++-v3 Doxygen

# libstdc++-v3 Source Documentation

This file is docs/doxygen/guide.html in the libstdc++-v3 source tree. It is not included in the generated pages (no real point to doing that).

- Creating the pages
- Writing the markup

## Creating the pages

The Makefile rules `'make doxygen'`, `'make doxygen-maint'`, and `'make doxygen-man'` in the libstdc++-v3 build directory generate the user-level HTML docs, the maintainer-level HTML docs, and the man pages, respectively. Prerequisite tools are Bash 2.x, , a working version of `g++` somewhere in the PATH, and the GNU coreutils. In addition, to generate the pretty pictures, the Graphviz package will need to be installed. (g++ is used to build a program which manipulates man pages. GNU versions of find, xargs, and possibly sed and grep are used, just because the GNU versions make things very easy.)

Careful observers will see that the Makefile rules simply call a script from the source tree, `run_doxygen`, which does the actual work of running Doxygen and then (most importantly) massaging the output files. If for some reason you prefer to not go through the Makefile, you can call this script directly. (Start by passing `'--help'`.)

If you wish to tweak the Doxygen settings, do so by editing `docs/doxygen/user.cfg.in`. Notes to v3-hackers are written in triple-# comments.

## Writing the markup

In general, libstdc++-v3 files should be formatted according to the GNU C++ Coding Standard rules found in the file C++STYLE. Before any doxygen-specific formatting tweaks are made, please try to make sure that the initial formatting is sound.

Adding Doxygen markup to a file (informally called "doxygenating") is very simple. The Doxygen manual can be found here. We try to use a very-recent version of Doxygen.

### Doxygen style guide

[incomplete and constantly evolving]

For classes, use deque/vector/list and std::pair as examples. For functions, see their member functions, and the free functions in `stl_algobase.h`. Member functions of other container-like types should read similarly to these member functions.

These points accompany the first list in section 3.1 of the Doxygen manual:

1. Use the Javadoc style...
2. ...not the Qt style. The intermediate *'s are preferred.
3. Use the triple-slash style only for one-line comments (the "brief" mode). Very recent versions of Doxygen permit full-mode comments in triple-slash blocks, but the formatting still comes out wonky.
4. This is disgusting. Don't do this.

Use the @-style of commands, not the !-style. Please be careful about whitespace in your markup comments. Most of the time it doesn't matter; doxygen absorbs most whitespace, and both HTML and *roff are agnostic about whitespace. However, in <pre> blocks and @code/@endcode sections, spacing can have "interesting" effects.

Use either kind of grouping, as appropriate. `doxygroups.cc` exists for this purpose. See `stl_iterator.h` for a good example of the "other" kind of grouping.

Please use markup tags like @p and @a when referring to things such as the names of function parameters. Use @e for emphasis when necessary. Use @c to refer to other standard names. (Examples of all these abound in the present code.)