aboutsummaryrefslogtreecommitdiff
path: root/docs/meson.build
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-08-11 09:07:04 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-08-21 06:30:41 -0400
commitbac35bf5175fb16470a73492c23161e80361eeeb (patch)
treea2cfccf3eb75460b5c4eac42e233c30e1a8b475b /docs/meson.build
parentf8aa24ea9a82da38370470c6bc0eaa393999edfe (diff)
docs: automatically track manual dependencies
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'docs/meson.build')
-rw-r--r--docs/meson.build21
1 files changed, 13 insertions, 8 deletions
diff --git a/docs/meson.build b/docs/meson.build
index 20fc92e2fe..8b059a8e39 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -34,16 +34,21 @@ if build_docs
sphinxmans = []
foreach manual : manuals
private_dir = meson.current_build_dir() / (manual + '.p')
+ output_dir = meson.current_build_dir() / manual
input_dir = meson.current_source_dir() / manual
- sphinxdocs += custom_target(manual + ' manual',
- build_always_stale: true,
+
+ this_manual = custom_target(manual + ' manual',
build_by_default: build_docs,
- output: manual,
- command: [SPHINX_ARGS, '-b', 'html', '-d', private_dir,
- input_dir, meson.current_build_dir() / manual])
+ output: [manual + '.stamp'],
+ input: [files('conf.py'), files(manual / 'conf.py')],
+ depfile: manual + '.d',
+ command: [SPHINX_ARGS, '-Ddepfile=@DEPFILE@',
+ '-Ddepfile_stamp=@OUTPUT0@',
+ '-b', 'html', '-d', private_dir,
+ input_dir, output_dir])
+ sphinxdocs += this_manual
if build_docs and manual != 'devel'
- install_subdir(meson.current_build_dir() / manual,
- install_dir: config_host['qemu_docdir'])
+ install_subdir(output_dir, install_dir: config_host['qemu_docdir'])
endif
these_man_pages = []
@@ -54,9 +59,9 @@ if build_docs
endforeach
if these_man_pages.length() > 0
sphinxmans += custom_target(manual + ' man pages',
- build_always_stale: true,
build_by_default: build_docs,
output: these_man_pages,
+ input: this_manual,
install: build_docs,
install_dir: install_dirs,
command: [SPHINX_ARGS, '-b', 'man', '-d', private_dir,