diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-02-13 12:37:35 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-03-10 12:51:06 -0500 |
commit | 6910f5dcb6784360589b860b8f80487a5c97fe08 (patch) | |
tree | 79881697308337c0c2397d433e5405b702a0f920 /doc/internal-api/local.mk | |
parent | 66f49864f36a4a350926829273b85c0236f301d8 (diff) |
Generate API docs with Doxygen
The motivation is as stated in issue #7814: even though the the C++ API
is internal and unstable, people still want it to be well documented for
sake of learning, code review, and other purposes that aren't predicated
on it being stable.
Fixes #7814
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Diffstat (limited to 'doc/internal-api/local.mk')
-rw-r--r-- | doc/internal-api/local.mk | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/internal-api/local.mk b/doc/internal-api/local.mk new file mode 100644 index 000000000..890f341b7 --- /dev/null +++ b/doc/internal-api/local.mk @@ -0,0 +1,19 @@ +.PHONY: internal-api-html + +ifeq ($(internal_api_docs), yes) + +$(docdir)/internal-api/html/index.html $(docdir)/internal-api/latex: $(d)/doxygen.cfg + mkdir -p $(docdir)/internal-api + { cat $< ; echo "OUTPUT_DIRECTORY=$(docdir)/internal-api" ; } | doxygen - + +# Generate the HTML API docs for Nix's unstable internal interfaces. +internal-api-html: $(docdir)/internal-api/html/index.html + +else + +# Make a nicer error message +internal-api-html: + @echo "Internal API docs are disabled. Configure with '--enable-internal-api-docs', or avoid calling 'make internal-api-html'." + @exit 1 + +endif |