diff options
author | Qyriad <qyriad@qyriad.me> | 2024-04-11 12:17:19 -0600 |
---|---|---|
committer | Qyriad <qyriad@qyriad.me> | 2024-04-15 19:05:07 -0600 |
commit | b81eec6ed56e5a5ad448359fc3d7755b68e59d0b (patch) | |
tree | eb8655a9f1447ae3c5fe5ae73cae7c2b9340b3b2 /doc | |
parent | 99845e0e01eaa2120b10c22591c43c4305f5ba51 (diff) |
build internal API docs with Meson
This commit adds the capability for building the Doxygen internal API
docs in the Meson buildsystem, and also makes doing so the default for
the internal-api-docs hydra job. Aside from the /nix-support directory,
which differed only by the hash part of a store path, the outputs of
hydraJobs.internal-api-docs before and after this commit were
bit-for-bit identical on my machine.
Change-Id: I98f0017891c25b06866c15f7652fe74f706ec8e1
Diffstat (limited to 'doc')
-rw-r--r-- | doc/internal-api/doxygen.cfg.in | 2 | ||||
-rw-r--r-- | doc/internal-api/meson.build | 33 |
2 files changed, 35 insertions, 0 deletions
diff --git a/doc/internal-api/doxygen.cfg.in b/doc/internal-api/doxygen.cfg.in index ad5af97e6..55bccebd7 100644 --- a/doc/internal-api/doxygen.cfg.in +++ b/doc/internal-api/doxygen.cfg.in @@ -14,6 +14,8 @@ PROJECT_NAME = "Nix" PROJECT_NUMBER = @PACKAGE_VERSION@ +OUTPUT_DIRECTORY = @docdir@ + # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. diff --git a/doc/internal-api/meson.build b/doc/internal-api/meson.build new file mode 100644 index 000000000..35d8a0e5b --- /dev/null +++ b/doc/internal-api/meson.build @@ -0,0 +1,33 @@ +doxygen_cfg = configure_file( + input : 'doxygen.cfg.in', + output : 'doxygen.cfg', + configuration : { + 'PACKAGE_VERSION': meson.project_version(), + 'RAPIDCHECK_HEADERS': rapidcheck_meson.get_variable('includedir'), + 'docdir' : meson.current_build_dir(), + }, +) + +internal_api_docs = custom_target( + 'internal-api-docs', + command : [ + bash, + # Meson can you please just give us a `workdir` argument to custom targets... + '-c', + # We have to prefix the doxygen_cfg path with the project build root + # because of the cd in front. + 'cd @0@ && @1@ @2@/@INPUT0@'.format( + meson.project_source_root(), + doxygen.full_path(), + meson.project_build_root(), + ), + ], + input : [ + doxygen_cfg, + ], + output : 'html', + install : true, + install_dir : datadir / 'doc/nix/internal-api', +) + +alias_target('internal-api-html', internal_api_docs) |