[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 14/21] meson.build: Make manuals depend on source to Sphin
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v6 14/21] meson.build: Make manuals depend on source to Sphinx extensions |
Date: |
Tue, 29 Sep 2020 10:52:43 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Peter Maydell <peter.maydell@linaro.org> writes:
> 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>
> ---
> docs/meson.build | 1 +
> meson.build | 8 ++++++++
> 2 files changed, 9 insertions(+)
>
> diff --git a/docs/meson.build b/docs/meson.build
> index 99da609e813..59fea873b10 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 6408ad442ea..3c07e75dbd5 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -679,6 +679,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()
I touched docs/sphinx/qapidoc.py and the manual got rebuilt. Good.
Same for scripts/qapi/gen.py. Good, except it makes me disbelieve your
claim "we don't change the extensions all that often."
Any ideas beyond amending the commit message with something like "except
for the QAPI guys, pity the fools"? ;)
- Re: [PATCH v6 05/21] scripts/qapi/parser.py: improve doc comment indent handling, (continued)
- [PATCH v6 07/21] docs/sphinx: Add new qapi-doc Sphinx extension, Peter Maydell, 2020/09/25
- [PATCH v6 11/21] qga/qapi-schema.json: Add some headings, Peter Maydell, 2020/09/25
- [PATCH v6 15/21] tests/qapi-schema: Add test of the rST QAPI doc-comment outputn, Peter Maydell, 2020/09/25
- [PATCH v6 14/21] meson.build: Make manuals depend on source to Sphinx extensions, Peter Maydell, 2020/09/25
- Re: [PATCH v6 14/21] meson.build: Make manuals depend on source to Sphinx extensions,
Markus Armbruster <=
- [PATCH v6 10/21] qapi: Use rST markup for literal blocks, Peter Maydell, 2020/09/25
- [PATCH v6 20/21] configure: Drop texinfo requirement, Peter Maydell, 2020/09/25
- [PATCH v6 12/21] tests/qapi-schema: Convert doc-good.json to rST-style strong/emphasis, Peter Maydell, 2020/09/25
- [PATCH v6 13/21] meson.build: Move SPHINX_ARGS to top level meson.build file, Peter Maydell, 2020/09/25
- [PATCH v6 17/21] docs/devel/qapi-code-gen.txt: Update to new rST backend conventions, Peter Maydell, 2020/09/25