WIP: build internal API docs with Meson

Change-Id: I98f0017891c25b06866c15f7652fe74f706ec8e1
This commit is contained in:
Qyriad 2024-04-11 12:17:19 -06:00
parent 99845e0e01
commit 349eb8efd7
3 changed files with 35 additions and 0 deletions

View file

@ -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.

View file

@ -0,0 +1,28 @@
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(
# FIXME(Qyriad): alias to internal-api-html
'internal-api-docs',
command : [
bash,
'-c',
'cd @0@ && @INPUT0@ @1@/@INPUT1@'.format(
meson.project_source_root(), meson.project_build_root()
),
],
input : [
doxygen.full_path(),
doxygen_cfg,
],
output : 'html',
install : true,
install_dir : datadir / 'doc/nix',
)

View file

@ -278,6 +278,10 @@ lsof = find_program('lsof')
bison = find_program('bison')
flex = find_program('flex')
if enable_docs # FIXME: internal-api-docs
doxygen = find_program('doxygen')
endif
# This is how Nix does generated headers...
# other instances of header generation use a very similar command.
# FIXME(Qyriad): do we really need to use the shell for this?
@ -396,6 +400,7 @@ subdir('misc')
if enable_docs
subdir('doc/manual')
subdir('doc/internal-api')
endif
if enable_tests