Documentation generation produces consumable output in one command

Building the docs target now generates the reference and leaves finished
documents in the build tree's docs directory: pdf/ holds the compiled
PDF, html/ holds the browsable reference when that format is enabled.
Doxygen and LaTeX work under docs/tmp/, which clean removes along with
the rest of the tree.

The reference has a front page and a structure. The markdown documents
in docs/ are part of the input, OVERVIEW.md becomes the landing page,
and the rest follow as chapters ahead of the namespace, class, and file
reference. The module contract, previously a plain comment block
invisible to Doxygen, is a page in its own right.

Struct and enum members throughout the headers carry documentation, on
their own lines above what they describe.
This commit is contained in:
2026-08-15 20:19:26 -04:00
parent 17acad2b02
commit 1cd79e79f3
8 changed files with 183 additions and 114 deletions

View File

@@ -29,11 +29,20 @@
* @brief Commands supported by the info module
*/
enum Command {
CMD_UNKNOWN, /**< Unknown or unsupported command */
CMD_HELP, /**< Display help information */
CMD_VERSION, /**< Display libdpm-core and module versions */
CMD_SYSTEM, /**< Display system information */
CMD_CONFIG, /**< Display configuration information */
/** Unknown or unsupported command. */
CMD_UNKNOWN,
/** Display help information. */
CMD_HELP,
/** Display library and module versions. */
CMD_VERSION,
/** Display system information. */
CMD_SYSTEM,
/** Display configuration information. */
CMD_CONFIG,
};
/**

View File

@@ -1,65 +1,16 @@
/*
* libdpm-core.map — the linker version script for libdpm-core.so
* libdpm-core.map — holds libdpm-core.so's exports to the public C API,
* so <dpm/core.h> describes the binary exactly and the implementation
* behind it stays private.
*
* Passed to the linker with --version-script; see CMakeLists.txt, which
* also lists it as a link dependency so edits force a relink. It does
* two separate jobs.
*
*
* 1. It limits the export set.
*
* `global` names every function declared in <dpm/core.h>. `local: *`
* hides everything else, including the template instantiations that
* libstdc++ headers emit with default visibility.
*
*
* 2. It versions the exports.
*
* Every symbol here is stamped with the node name: dpm_open becomes
* dpm_open@@DPM_CORE_1.0. The linker reads that node off the library a
* consumer links against and records it in the consumer's own binary,
* and at startup the dynamic linker verifies the library still provides
* it.
*
* That keeps an already-installed module working after the library
* changes underneath it, which is what makes updating libdpm-core.so
* safe mid-bootstrap.
*
* A breaking change ships as a new node while the old node keeps its
* original definitions, so binaries built against the old node keep
* resolving them. Both live in one .so under one soname, preserving the
* invariant the routing model depends on: exactly one instance of the
* library mapped per process.
*
*
* Changing this file:
*
* - A new public function goes into `global` in the same commit that
* adds it to <dpm/core.h>.
* - A breaking change to an existing function adds a new node above
* DPM_CORE_1.0, leaving this node and its definitions intact.
*
* Newest node first. DPM_CORE_0.1 was never released; it is here as the
* shape a retired node takes.
* Passed to the linker with --version-script. `dpm_*` passes the
* functions marked DPM_API in the header, which is where membership is
* decided; `local: *` hides the rest, including the template
* instantiations libstdc++ headers emit with default visibility.
*/
DPM_CORE_1.0 {
{
global:
dpm_open;
dpm_close;
dpm_require;
dpm_module_info_of;
dpm_execute;
dpm_list_modules;
dpm_cursor_next;
dpm_cursor_free;
dpm_core_version;
dpm_config_get;
dpm_log;
dpm_module_path;
dpm_last_error;
dpm_*;
local:
*;
};
DPM_CORE_0.1 {
};