[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 22/29] meson.build: Make manuals depend on source to Sphinx extens
From: |
Markus Armbruster |
Subject: |
[PULL 22/29] meson.build: Make manuals depend on source to Sphinx extensions |
Date: |
Tue, 29 Sep 2020 22:19:19 +0200 |
From: Peter Maydell <peter.maydell@linaro.org>
The automatic dependency handling for Sphinx manuals only makes the output
depend on the input documentation files. This means that if you edit
the Python source of an extension then the documentation won't be
rebuilt.
Create a list of all the source files for the extensions and add
it to the dependencies for the manuals. This is similar to how we
handle the qapi_gen_depends list.
Because we don't try to identify which manuals are using which
Sphinx extensions, a change to the source of one extension will
always rebuild the entire manual set, not merely the manuals
which have changed. This is acceptable because we don't change
the extensions all that often.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200925162316.21205-15-peter.maydell@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Re rebuilding the enitre manual set being acceptable "because we
don't change the extensions all that often": we also rebuild it when
the QAPI generator code the qapidoc extension depends on changes.
This will inconvenience QAPI developers. Can't be helped now.]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
docs/meson.build | 1 +
meson.build | 8 ++++++++
2 files changed, 9 insertions(+)
diff --git a/docs/meson.build b/docs/meson.build
index 52e384be17..0340d489ac 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -36,6 +36,7 @@ if build_docs
output: [manual + '.stamp'],
input: [files('conf.py'), files(manual / 'conf.py')],
depfile: manual + '.d',
+ depend_files: sphinx_extn_depends,
command: [SPHINX_ARGS, '-Ddepfile=@DEPFILE@',
'-Ddepfile_stamp=@OUTPUT0@',
'-b', 'html', '-d', private_dir,
diff --git a/meson.build b/meson.build
index 866321462e..6cb8aebd7d 100644
--- a/meson.build
+++ b/meson.build
@@ -680,6 +680,14 @@ if get_option('werror')
SPHINX_ARGS += [ '-W' ]
endif
+sphinx_extn_depends = [ meson.source_root() / 'docs/sphinx/depfile.py',
+ meson.source_root() / 'docs/sphinx/hxtool.py',
+ meson.source_root() / 'docs/sphinx/kerneldoc.py',
+ meson.source_root() / 'docs/sphinx/kernellog.py',
+ meson.source_root() / 'docs/sphinx/qapidoc.py',
+ meson.source_root() / 'docs/sphinx/qmp_lexer.py',
+ qapi_gen_depends ]
+
# Collect sourcesets.
util_ss = ss.source_set()
--
2.26.2
- [PULL 21/29] meson.build: Move SPHINX_ARGS to top level meson.build file, (continued)
- [PULL 21/29] meson.build: Move SPHINX_ARGS to top level meson.build file, Markus Armbruster, 2020/09/29
- [PULL 16/29] docs/interop: Convert qemu-ga-ref to rST, Markus Armbruster, 2020/09/29
- [PULL 26/29] scripts/texi2pod: Delete unused script, Markus Armbruster, 2020/09/29
- [PULL 28/29] configure: Drop texinfo requirement, Markus Armbruster, 2020/09/29
- [PULL 23/29] tests/qapi-schema: Add test of the rST QAPI doc-comment output, Markus Armbruster, 2020/09/29
- [PULL 17/29] docs/interop: Convert qemu-qmp-ref to rST, Markus Armbruster, 2020/09/29
- [PULL 24/29] scripts/qapi: Remove texinfo generation support, Markus Armbruster, 2020/09/29
- [PULL 18/29] qapi: Use rST markup for literal blocks, Markus Armbruster, 2020/09/29
- [PULL 13/29] scripts/qapi/parser.py: improve doc comment indent handling, Markus Armbruster, 2020/09/29
- [PULL 15/29] docs/sphinx: Add new qapi-doc Sphinx extension, Markus Armbruster, 2020/09/29
- [PULL 22/29] meson.build: Make manuals depend on source to Sphinx extensions,
Markus Armbruster <=
- [PULL 12/29] scripts/qapi: Move doc-comment whitespace stripping to doc.py, Markus Armbruster, 2020/09/29
- [PULL 02/29] qapi: Correct balloon documentation, Markus Armbruster, 2020/09/29
- [PULL 14/29] qapi/machine.json: Escape a literal '*' in doc comment, Markus Armbruster, 2020/09/29
- [PULL 05/29] qapi: Restrict query-uuid command to machine code, Markus Armbruster, 2020/09/29
- [PULL 25/29] docs/devel/qapi-code-gen.txt: Update to new rST backend conventions, Markus Armbruster, 2020/09/29
- Re: [PULL 00/29] QAPI patches patches for 2020-09-29, Peter Maydell, 2020/09/30