From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- .../doc/html/manual/documentation_hacking.html | 442 +++++++++++++++++++++ 1 file changed, 442 insertions(+) create mode 100644 libstdc++-v3/doc/html/manual/documentation_hacking.html (limited to 'libstdc++-v3/doc/html/manual/documentation_hacking.html') diff --git a/libstdc++-v3/doc/html/manual/documentation_hacking.html b/libstdc++-v3/doc/html/manual/documentation_hacking.html new file mode 100644 index 000000000..fbb85b150 --- /dev/null +++ b/libstdc++-v3/doc/html/manual/documentation_hacking.html @@ -0,0 +1,442 @@ + + +Writing and Generating Documentation

+ Certain Makefile rules are required by the GNU Coding + Standards. These standard rules generate HTML, PDF, XML, or man + files. For each of the generative rules, there is an additional + install rule that is used to install any generated documentation + files into the prescribed installation directory. Files are + installed into share/doc + or share/man directories. +

+ The standard Makefile rules are conditionally supported, based + on the results of examining the host environment for + prerequisites at configuration time. If requirements are not + found, the rule is aliased to a dummy rule that does nothing, + and produces no documentation. If the requirements are found, + the rule forwards to a private rule that produces the requested + documentation. +

+ For more details on what prerequisites were found and where, + please consult the file config.log in the + libstdc++ build directory. Compare this log to what is expected + for the relevant Makefile conditionals: + BUILD_INFO, BUILD_XML, + BUILD_HTML, BUILD_MAN, + BUILD_PDF, and BUILD_EPUB. +

+ Supported Makefile rules: +

+ Makefile rules for several other formats are explicitly not + supported, and are always aliased to dummy rules. These + unsupported formats are: info, + ps, and dvi. +


+ Prerequisite tools are Bash 2.0 or later, + Doxygen, and + the GNU + coreutils. (GNU versions of find, xargs, and possibly + sed and grep are used, just because the GNU versions make + things very easy.) +

+ To generate the pretty pictures and hierarchy + graphs, the + Graphviz package + will need to be installed. For PDF + output, + pdflatex is required. +

+ In general, libstdc++ files should be formatted according to + the rules found in the + Coding Standard. 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. +

+ 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. +

+ Some commentary to accompany + the first list in the Special + Documentation Blocks section of + the Doxygen manual: +

  1. For longer comments, 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). +

  4. + This is disgusting. Don't do this. +

+ Some specific guidelines: +

+ 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.) +

+ Complicated math functions should use the multi-line + format. An example from random.h: +

+


+/**
+ * @brief A model of a linear congruential random number generator.
+ *
+ * @f[
+ *     x_{i+1}\leftarrow(ax_{i} + c) \bmod m
+ * @f]
+ */
+

+

+ One area of note is the markup required for + @file markup in header files. Two details + are important: for filenames that have the same name in + multiple directories, include part of the installed path to + disambiguate. For example: +

+


+/** @file debug/vector
+ *  This file is a GNU debug extension to the Standard C++ Library.
+ */
+

+

+ The other relevant detail for header files is the use of a + libstdc++-specific doxygen alias that helps distinguish + between public header files (like random) + from implementation or private header files (like + bits/c++config.h.) This alias is spelled + @headername and can take one or two + arguments that detail the public header file or files that + should be included to use the contents of the file. All header + files that are not intended for direct inclusion must use + headername in the file + block. An example: +

+


+/** @file bits/basic_string.h
+ *  This is an internal header file, included by other library headers.
+ *  Do not attempt to use it directly. @headername{string}
+ */
+

+

+ Be careful about using certain, special characters when + writing Doxygen comments. Single and double quotes, and + separators in filenames are two common trouble spots. When in + doubt, consult the following table. +



+ Editing the DocBook sources requires an XML editor. Many + exist: some notable options + include emacs, Kate, + or Conglomerate. +

+ Some editors support special XML Validation + modes that can validate the file as it is + produced. Recommended is the nXML Mode + for emacs. +

+ Besides an editor, additional DocBook files and XML tools are + also required. +

+ Access to the DocBook 5.0 stylesheets and schema is required. The + stylesheets are usually packaged by vendor, in something + like docbook5-style-xsl. To exactly match + generated output, please use a version of the stylesheets + equivalent + to docbook5-style-xsl-1.75.2-3. The + installation directory for this package corresponds to + the XSL_STYLE_DIR + in doc/Makefile.am and defaults + to /usr/share/sgml/docbook/xsl-ns-stylesheets. +

+ For processing XML, an XML processor and some style + sheets are necessary. Defaults are xsltproc + provided by libxslt. +

+ For validating the XML document, you'll need + something like xmllint and access to the + relevant DocBook schema. These are provided + by a vendor package like libxml2 and docbook5-schemas-5.0-4 +

+ For PDF output, something that transforms valid Docbook XML to PDF is + required. Possible solutions include dblatex, + xmlto, or prince. Of + these, dblatex is the default. Other + options are listed on the DocBook web pages. Please + consult the list when + preparing printed manuals for current best practice and + suggestions. +

+ For Texinfo output, something that transforms valid Docbook + XML to Texinfo is required. The default choice is docbook2X. +


+      Which files are important
+
+      All Docbook files are in the directory
+      libstdc++-v3/doc/xml
+
+      Inside this directory, the files of importance:
+      spine.xml   - index to documentation set
+      manual/spine.xml  - index to manual
+      manual/*.xml   - individual chapters and sections of the manual
+      faq.xml   - index to FAQ
+      api.xml   - index to source level / API
+
+      All *.txml files are template xml files, i.e., otherwise empty files with
+      the correct structure, suitable for filling in with new information.
+
+      Canonical Writing Style
+
+      class template
+      function template
+      member function template
+      (via C++ Templates, Vandevoorde)
+
+      class in namespace std: allocator, not std::allocator
+
+      header file: iostream, not <iostream>
+
+
+      General structure
+
+      <set>
+      <book>
+      </book>
+
+      <book>
+      <chapter>
+      </chapter>
+      </book>
+
+      <book>
+      <part>
+      <chapter>
+      <section>
+      </section>
+
+      <sect1>
+      </sect1>
+
+      <sect1>
+      <sect2>
+      </sect2>
+      </sect1>
+      </chapter>
+
+      <chapter>
+      </chapter>
+      </part>
+      </book>
+
+      </set>
+    

-- cgit v1.2.3