HeaderDoc is a documentation generator developed and maintained by Apple Inc. Using specially commented source code files as input, HeaderDoc generates documentation for the code in HTML or XML format. Syntax for HeaderDoc comment tags is largely similar to, and as of HeaderDoc version 8, supportive of Javadoc tags. HeaderDoc 8.7 and later also provides partial support for many Doxygen tags (@ form only, and must conform to HeaderDoc tag ordering rules). Apple's HeaderDoc project is free, open source software distributed under the Apple Public Source License.
|Initial release||September 13, 2000|
8.9 / June 8, 2009
|Written in||Perl, C (helpers)|
|Operating system||Mac OS X, UNIX, Linux|
|License||Apple Public Source License 2.0|
Supported plain text languagesEdit
- Bourne Shell
- C Shell
- Korn Shell
- Mach MIG definitions 
The HeaderDoc tool set consists of the main utility, headerdoc2html, and gatherheaderdoc. The headerdoc2html tool generates a directory of either HTML (or optionally XML) files from the commented source files specified. Afterwards, the gatherheaderdoc utility may be executed to create a table of contents file for the documentation. Finally, the resolveLinks utility may be used to resolve cross-references between multiple documentation collections.
Apple's Xcode development environment contains features designed to assist the process of creating documentation using the HeaderDoc syntax and tools.
HeaderDoc has the following core features:
- C preprocessing, allowing user-selected #define macros to alter the content, and allowing the user to pass command-line flags to ignore portions of the input.
- Syntax coloring with user-defined styles.
- Template-driven landing pages for indices.
- Cross-platform (written mostly in Perl).
The HeaderDoc suite also includes several tools that may be used independently:
- MPGL—a set of tools designed to simplify creation of UNIX manual pages using a lightweight XML syntax consisting of a subset of XHTML plus section tags, parameter tags, etc. HeaderDoc also provides a bridging tool that helps generate manual pages from header comments for functions via HeaderDoc's XML output mode.
- resolveLinks—a tool that allows for rapid web site relinking when content moves to a different address through the use of embedded anchors and link requests.
- filtermacros.pl—a tool that can be used to filter out sections of headers based on C preprocessor macros. This is currently available only by downloading the source tarball. As of HeaderDoc 8.9, this functionality is built into the headerdoc2html tool itself.