diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2020-01-24 16:26:01 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-02-03 10:46:32 +0000 |
commit | 6803d6e9a7d951cd65bbdd88bfe6f8a921c95f54 (patch) | |
tree | 0740ed57be6408d22c2f4c43070c639bdd7b72da /po | |
parent | b0cecc0d65ec7c4c06cfd987e79eab1a0afee39b (diff) | |
download | qemu-6803d6e9a7d951cd65bbdd88bfe6f8a921c95f54.zip qemu-6803d6e9a7d951cd65bbdd88bfe6f8a921c95f54.tar.gz qemu-6803d6e9a7d951cd65bbdd88bfe6f8a921c95f54.tar.bz2 |
docs/sphinx: Add new hxtool Sphinx extension
Some of our documentation includes sections which are created
by assembling fragments of texinfo from a .hx source file into
a .texi file, which is then included from qemu-doc.texi or
qemu-img.texi.
For Sphinx, rather than creating a file to include, the most natural
way to handle this is to have a small custom Sphinx extension which
reads the .hx file and process it. So instead of:
* makefile produces foo.texi from foo.hx
* qemu-doc.texi says '@include foo.texi'
we have:
* qemu-doc.rst says 'hxtool-doc:: foo.hx'
* the Sphinx extension for hxtool has code that runs to handle that
Sphinx directive which reads the .hx file and emits the appropriate
documentation contents
This is pretty much the same way the kerneldoc extension works right
now. It also has the advantage that it should work for third-party
services like readthedocs that expect to build the docs directly with
sphinx rather than by invoking our makefiles.
In this commit we implement the hxtool extension.
Note that syntax errors in the rST fragments will be correctly
reported to the user with the filename and line number within the
hx file.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20200124162606.8787-4-peter.maydell@linaro.org
Diffstat (limited to 'po')
0 files changed, 0 insertions, 0 deletions