docs: Add gi-docgen check to tests

Can be called via:

    meson test --suite docs
This commit is contained in:
Maximiliano Sandoval 2024-05-25 23:17:36 +02:00
parent 2bbfa92504
commit a692f0cb07
No known key found for this signature in database
GPG Key ID: D64A8D747F6FE706
3 changed files with 48 additions and 0 deletions

View File

@ -29,6 +29,18 @@ if get_option('documentation')
install_dir: docs_dir,
)
test('doc-check-gdk',
gidocgen,
args: [
'check',
'--config', gdk4_toml,
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
gdk_gir[0],
],
depends: gdk_gir[0],
suite: ['docs'],
)
if x11_enabled
gdk4x11_toml = configure_file(
input: 'gdk4-x11.toml.in',
@ -87,5 +99,17 @@ if get_option('documentation')
install: true,
install_dir: docs_dir,
)
test('doc-check-gdk-wayland',
gidocgen,
args: [
'check',
'--config', gdk4wayland_toml,
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
gdk_wayland_gir[0],
],
depends: gdk_wayland_gir[0],
suite: ['docs'],
)
endif
endif

View File

@ -30,4 +30,16 @@ if get_option('documentation')
install: true,
install_dir: docs_dir,
)
test('doc-check-gsk',
gidocgen,
args: [
'check',
'--config', gsk4_toml,
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
gsk_gir[0],
],
depends: gsk_gir[0],
suite: ['docs'],
)
endif

View File

@ -64,6 +64,18 @@ if get_option('documentation')
install_dir: docs_dir,
install_tag: 'doc',
)
test('doc-check-gtk',
gidocgen,
args: [
'check',
'--config', gtk4_toml,
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
gtk_gir[0],
],
depends: gtk_gir[0],
suite: ['docs'],
)
endif
rst2man = find_program('rst2man', 'rst2man.py', required: get_option('man-pages'))