Introduction to Doxygen
The Doxygen package contains a
documentation system for C++, C, Java, Objective-C, Corba IDL and
to some extent PHP, C# and D. It is useful for generating HTML
documentation and/or an off-line reference manual from a set of
documented source files. There is also support for generating
output in RTF, PostScript, hyperlinked PDF, compressed HTML, and
Unix man pages. The documentation is extracted directly from the
sources, which makes it much easier to keep the documentation
consistent with the source code.
You can also configure Doxygen to
extract the code structure from undocumented source files. This is
very useful to quickly find your way in large source distributions.
Used along with Graphviz, you can
also visualize the relations between the various elements by means
of include dependency graphs, inheritance diagrams, and
collaboration diagrams, which are all generated automatically.
Note
Development versions of BLFS may not build or run some packages
properly if LFS or dependencies have been updated since the most
recent stable versions of the books.
Package Information
-
Download (HTTP): https://doxygen.nl/files/doxygen-1.12.0.src.tar.gz
-
Download MD5 sum: 3ab97fd76c6fe090946c836c5051182b
-
Download size: 8.1 MB
-
Estimated disk space required: 248 MB (with tests)
-
Estimated build time: 1.9 SBU (with tests; both using
parallelism=4)
Doxygen Dependencies
Required
CMake-3.31.1 and git-2.47.1
Recommended
Qt-6.8.1
(for doxywizard)
Optional
Graphviz-12.2.1, ghostscript-10.04.0, libxml2-2.13.5
(required for the tests), LLVM-19.1.0 (with clang), texlive-20240312 (or install-tl-unx), xapian-1.4.27 (for
doxyindexer), and javacc
Installation of Doxygen
First, fix up some python scripts:
grep -rl '^#!.*python$' | xargs sed -i '1s/python/&3/'
Install Doxygen by running the
following commands:
mkdir -v build &&
cd build &&
cmake -G "Unix Makefiles" \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=/usr \
-D build_wizard=ON \
-D force_qt=Qt6 \
-W no-dev .. &&
make
To test the results, issue: make
tests. One test, 012_cite.dox, is known to fail if
texlive-20240312 or install-tl-unx is not installed.
If you wish to generate the package documentation, you must have
Python, TeX Live (for HTML docs) and Ghostscript (for PDF docs) installed, then
issue the following command:
cmake -D build_doc=ON \
-D DOC_INSTALL_DIR=share/doc/doxygen-1.12.0 \
.. &&
make docs
Now, as the root
user:
make install &&
install -vm644 ../doc/*.1 /usr/share/man/man1
If you have generated the package documentation, then the man pages
are automatically installed, and you do not need to run the last
install ... command.
Command Explanations
-D build_wizard=OFF
: Use this switch if
Qt6 is not installed.
-D build_search=ON
: Use this switch if
xapian is installed and you wish
to build external search tools (doxysearch.cgi and doxyindexer).
-D force_qt6=ON
: Use this switch to
build doxywizard with
Qt6 even if Qt5 is installed.
-D use_libclang=ON
: Use this switch if
llvm with clang are installed, to add support for
libclang parsing.
Configuring Doxygen
There is no real configuration necessary for the Doxygen package although three additional
packages are required if you wish to use extended capabilities. If
you require formulas to create PDF documentation, then you must
have texlive-20240312 installed. If you
require formulas to convert PostScript files to bitmaps, then you
must have ghostscript-10.04.0 installed.
Contents
Installed Programs:
doxygen and optionally, doxywizard,
doxyindexer and doxysearch.cgi
Installed Libraries:
None
Installed Directory:
/usr/share/doc/doxygen-1.12.0
Short Descriptions
doxygen
|
is a command-line based utility used to generate template
configuration files and then generate documentation from
these templates. Use doxygen --help for an
explanation of the command-line parameters
|
doxywizard
|
is a GUI front-end for configuring and running
doxygen
|
doxyindexer
|
generates a search index called doxysearch.db from one or more search
data files produced by doxygen. See, e.g.
https://javacc.github.io/javacc/
|
doxysearch.cgi
|
is a CGI program to search the data indexed by
doxyindexer
|