mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 06:30:10 +01:00
We need to regenerate the docs if any of the rst-files are changed. So let's add a simple extension to generate a depfile, so meson will pick up any changes needed. 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>
17 lines
496 B
Meson
17 lines
496 B
Meson
html_docs = custom_target(
|
|
'html',
|
|
depfile: 'docs.d',
|
|
depend_files: files('conf.py'),
|
|
command: [sphinx, '-b', 'html', '-q',
|
|
'-Ddepfile=@DEPFILE@',
|
|
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
|
|
)
|