meson: build html-docs
This allows us to build our Sphinx-based documentation from the meson build system. Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Eric Engestrom <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11494>
This commit is contained in:

committed by
Marge Bot

parent
69809a0384
commit
c26d4ee44f
15
docs/meson.build
Normal file
15
docs/meson.build
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
html_docs = custom_target(
|
||||||
|
'html',
|
||||||
|
depend_files: files('conf.py'),
|
||||||
|
command: [sphinx, '-b', 'html', '-q', meson.current_source_dir(),
|
||||||
|
'@OUTPUT@'],
|
||||||
|
output: 'html',
|
||||||
|
build_by_default: get_option('html-docs').enabled(),
|
||||||
|
)
|
||||||
|
|
||||||
|
install_subdir(html_docs.full_path(),
|
||||||
|
install_dir: join_paths(get_option('datadir'), 'doc', 'mesa'),
|
||||||
|
exclude_files: ['.buildinfo'],
|
||||||
|
exclude_directories: ['.doctrees'],
|
||||||
|
strip_directory: true
|
||||||
|
)
|
@@ -2304,6 +2304,12 @@ subdir('src')
|
|||||||
|
|
||||||
meson.add_devenv(devenv)
|
meson.add_devenv(devenv)
|
||||||
|
|
||||||
|
sphinx = find_program('sphinx-build', version : '>= 4.3',
|
||||||
|
required: get_option('html-docs'))
|
||||||
|
if sphinx.found()
|
||||||
|
subdir('docs')
|
||||||
|
endif
|
||||||
|
|
||||||
summary(
|
summary(
|
||||||
{
|
{
|
||||||
'prefix': get_option('prefix'),
|
'prefix': get_option('prefix'),
|
||||||
|
@@ -483,6 +483,13 @@ option(
|
|||||||
'This option is for developers and the Intel CI system only.'
|
'This option is for developers and the Intel CI system only.'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
option(
|
||||||
|
'html-docs',
|
||||||
|
type : 'feature',
|
||||||
|
value : 'disabled',
|
||||||
|
description : 'Build HTML documentation.'
|
||||||
|
)
|
||||||
|
|
||||||
option(
|
option(
|
||||||
'selinux',
|
'selinux',
|
||||||
type : 'boolean',
|
type : 'boolean',
|
||||||
|
Reference in New Issue
Block a user