]> www.infradead.org Git - users/dwmw2/qemu.git/commit
doc/sphinx/hxtool.py: add optional label argument to SRST directive xenfv-net
authorDavid Woodhouse <dwmw@amazon.co.uk>
Mon, 6 Nov 2023 13:34:05 +0000 (13:34 +0000)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Thu, 1 Feb 2024 16:03:28 +0000 (16:03 +0000)
commit902534037c9f438a27ba8951c1ec4b07ee867af6
tree656f7b2f33fcc691d1e34ca0f471392b7f9ae800
parentcaab50cdc1399844eac28e133d36466a950bf1d6
doc/sphinx/hxtool.py: add optional label argument to SRST directive

We can't just embed labels directly into files like qemu-options.hx which
are included from multiple top-level rST files, because Sphinx sees the
labels as duplicate: https://github.com/sphinx-doc/sphinx/issues/9707

So add an optional argument to the SRST directive which causes a label
of the form '.. _DOCNAME-HXFILE-LABEL:' to be emitted, where 'DOCNAME'
is the name of the top level rST file, 'HXFILE' is the filename of the
.hx file, and 'LABEL' is the text provided within the 'SRST()' directive.
Using the DOCNAME of the top-level rST document means that it is unique
even when the .hx file is included from two different documents, as is
the case for qemu-options.hx

Now where the Xen PV documentation refers to the documentation for the
-initrd command line option, it can emit a link directly to it as
'<system/invocation-qemu-options-initrd>'.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
docs/devel/docs.rst
docs/sphinx/hxtool.py
docs/system/i386/xen.rst
qemu-options.hx