Cc'ing Peter who is currently doing modification is this.
On 1/21/20 1:23 PM, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> Create docs/tools based on docs/dev based on docs/devel.
>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> Makefile | 9 ++++++++-
> docs/index.rst | 1 +
> docs/tools/conf.py | 16 ++++++++++++++++
> docs/tools/index.rst | 12 ++++++++++++
> 4 files changed, 37 insertions(+), 1 deletion(-)
> create mode 100644 docs/tools/conf.py
> create mode 100644 docs/tools/index.rst
>
> diff --git a/Makefile b/Makefile
> index 18f52d6270..2375a1f81c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -822,6 +822,7 @@ endef
> install-sphinxdocs: sphinxdocs
> $(call install-manual,interop)
> $(call install-manual,specs)
> + $(call install-manual,tools)
>
> install-doc: $(DOCS) install-sphinxdocs
> $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)"
> @@ -1009,7 +1010,10 @@ docs/version.texi: $(SRC_PATH)/VERSION config-host.mak
> # and handles "don't rebuild things unless necessary" itself.
> # The '.doctrees' files are cached information to speed this up.
> .PHONY: sphinxdocs
> -sphinxdocs: $(MANUAL_BUILDDIR)/devel/index.html $(MANUAL_BUILDDIR)/interop/index.html $(MANUAL_BUILDDIR)/specs/index.html
> +sphinxdocs: $(MANUAL_BUILDDIR)/devel/index.html \
> + $(MANUAL_BUILDDIR)/interop/index.html \
> + $(MANUAL_BUILDDIR)/specs/index.html \
> + $(MANUAL_BUILDDIR)/tools/index.html
>
> # Canned command to build a single manual
> # Arguments: $1 = manual name, $2 = Sphinx builder ('html' or 'man')
> @@ -1029,6 +1033,9 @@ $(MANUAL_BUILDDIR)/interop/index.html: $(call manual-deps,interop)
> $(MANUAL_BUILDDIR)/specs/index.html: $(call manual-deps,specs)
> $(call build-manual,specs,html)
>
> +$(MANUAL_BUILDDIR)/tools/index.html: $(call manual-deps,tools)
> + $(call build-manual,tools,html)
> +
> $(MANUAL_BUILDDIR)/interop/qemu-ga.8: $(call manual-deps,interop)
> $(call build-manual,interop,man)
>
> diff --git a/docs/index.rst b/docs/index.rst
> index baa5791c17..f15ca17bf4 100644
> --- a/docs/index.rst
> +++ b/docs/index.rst
> @@ -13,4 +13,5 @@ Welcome to QEMU's documentation!
> interop/index
> devel/index
> specs/index
> + tools/index
>
> diff --git a/docs/tools/conf.py b/docs/tools/conf.py
> new file mode 100644
> index 0000000000..f9f76ff597
> --- /dev/null
> +++ b/docs/tools/conf.py
> @@ -0,0 +1,16 @@
> +# -*- coding: utf-8 -*-
> +#
> +# QEMU documentation build configuration file for the 'tools' manual.
> +#
> +# This includes the top level conf file and then makes any necessary tweaks.
> +import sys
> +import os
> +
> +qemu_docdir = os.path.abspath("..")
> +parent_config = os.path.join(qemu_docdir, "conf.py")
> +exec(compile(open(parent_config, "rb").read(), parent_config, 'exec'))
> +
> +# This slightly misuses the 'description', but is the best way to get
> +# the manual title to appear in the sidebar.
> +html_theme_options['description'] = u'Tools'
> +
> diff --git a/docs/tools/index.rst b/docs/tools/index.rst
> new file mode 100644
> index 0000000000..adbcd3bc72
> --- /dev/null
> +++ b/docs/tools/index.rst
> @@ -0,0 +1,12 @@
> +.. This is the top level page for the 'tools' manual.
> +
> +
> +QEMU tools
> +==========
> +
> +This manual documents various tools included with QEMU.
> +
> +Contents:
> +
> +.. toctree::
> + :maxdepth: 2
>