From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, patches@linaro.org,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 08/11] Separate conf.py for each manual we want
Date: Fri, 01 Feb 2019 16:58:01 +0000 [thread overview]
Message-ID: <87ef8rv42u.fsf@zen.linaroharston> (raw)
In-Reply-To: <20190201145035.22739-9-peter.maydell@linaro.org>
Peter Maydell <peter.maydell@linaro.org> writes:
> ---
> docs/conf.py | 37 +++++++++++++++++++++++++++++++------
> docs/devel/conf.py | 15 +++++++++++++++
> docs/devel/index.rst | 21 +++++++++++++++++++++
> docs/index.rst | 9 ++-------
> docs/interop/conf.py | 15 +++++++++++++++
> docs/interop/index.rst | 18 ++++++++++++++++++
> 6 files changed, 102 insertions(+), 13 deletions(-)
> create mode 100644 docs/devel/conf.py
> create mode 100644 docs/devel/index.rst
> create mode 100644 docs/interop/conf.py
> create mode 100644 docs/interop/index.rst
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
>
> diff --git a/docs/conf.py b/docs/conf.py
> index c04000e78e4..6a334f545ec 100644
> --- a/docs/conf.py
> +++ b/docs/conf.py
> @@ -3,6 +3,20 @@
> # QEMU documentation build configuration file, created by
> # sphinx-quickstart on Thu Jan 31 16:40:14 2019.
> #
> +# This config file can be used in one of two ways:
> +# (1) as a common config file which is included by the conf.py
> +# for each of QEMU's manuals: in this case sphinx-build is run multiple
> +# times, once per subdirectory.
> +# (2) as a top level conf file which will result in building all
> +# the manuals into a single document: in this case sphinx-build is
> +# run once, on the top-level docs directory.
> +#
> +# QEMU's makefiles take option (1), which allows us to install
> +# only the ones the user cares about (in particular we don't want
> +# to ship the 'devel' manual to end-users).
> +# Third-party sites such as readthedocs.org will take option (2).
> +#
> +#
> # This file is execfile()d with the current directory set to its
> # containing dir.
> #
> @@ -12,13 +26,22 @@
> # All configuration values have a default; values that are commented out
> # serve to show the default.
>
> +import os
> +import sys
> +
> +# The per-manual conf.py will set qemu_docdir for a single-manual build;
> +# otherwise set it here if this is an entire-manual-set build.
> +# This is always the absolute path of the docs/ directory in the source tree.
> +try:
> + qemu_docdir
> +except NameError:
> + qemu_docdir = os.path.abspath(".")
> +
> # If extensions (or modules to document with autodoc) are in another directory,
> # add these directories to sys.path here. If the directory is relative to the
> -# documentation root, use os.path.abspath to make it absolute, like shown here.
> +# documentation root, use an absolute path starting from qemu_docdir.
> #
> -# import os
> -# import sys
> -# sys.path.insert(0, os.path.abspath('.'))
> +# sys.path.insert(0, os.path.join(qemu_docdir, "my_subdir"))
>
>
> # -- General configuration ------------------------------------------------
> @@ -90,8 +113,10 @@ html_theme = 'alabaster'
> # Theme options are theme-specific and customize the look and feel of a theme
> # further. For a list of options available for each theme, see the
> # documentation.
> -#
> -# html_theme_options = {}
> +# We initialize this to empty here, so the per-manual conf.py can just
> +# add individual key/value entries.
> +html_theme_options = {
> +}
>
> # Add any paths that contain custom static files (such as style sheets) here,
> # relative to this directory. They are copied after the builtin static files,
> diff --git a/docs/devel/conf.py b/docs/devel/conf.py
> new file mode 100644
> index 00000000000..7441f87e7f5
> --- /dev/null
> +++ b/docs/devel/conf.py
> @@ -0,0 +1,15 @@
> +# -*- coding: utf-8 -*-
> +#
> +# QEMU documentation build configuration file for the 'devel' 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'Developer''s Guide'
> diff --git a/docs/devel/index.rst b/docs/devel/index.rst
> new file mode 100644
> index 00000000000..cd0fa6c9ba2
> --- /dev/null
> +++ b/docs/devel/index.rst
> @@ -0,0 +1,21 @@
> +.. This is the top level page for the 'devel' manual.
> +
> +
> +QEMU Developer's Guide
> +======================
> +
> +This manual documents various parts of the internals of QEMU.
> +You only need to read it if you are interested in reading or
> +modifying QEMU's source code.
> +
> +Contents:
> +
> +.. toctree::
> + :maxdepth: 2
> +
> + loads-stores
> + memory
> + migration
> + stable-process
> + testing
> +
> diff --git a/docs/index.rst b/docs/index.rst
> index 93f82228310..3690955dd1f 100644
> --- a/docs/index.rst
> +++ b/docs/index.rst
> @@ -10,11 +10,6 @@ Welcome to QEMU's documentation!
> :maxdepth: 2
> :caption: Contents:
>
> + interop/index
> + devel/index
>
> -
> -Indices and tables
> -==================
> -
> -* :ref:`genindex`
> -* :ref:`modindex`
> -* :ref:`search`
> diff --git a/docs/interop/conf.py b/docs/interop/conf.py
> new file mode 100644
> index 00000000000..cf3c69d4a7e
> --- /dev/null
> +++ b/docs/interop/conf.py
> @@ -0,0 +1,15 @@
> +# -*- coding: utf-8 -*-
> +#
> +# QEMU documentation build configuration file for the 'interop' 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'System Emulation Management and Interoperability Guide'
> diff --git a/docs/interop/index.rst b/docs/interop/index.rst
> new file mode 100644
> index 00000000000..2df977dd529
> --- /dev/null
> +++ b/docs/interop/index.rst
> @@ -0,0 +1,18 @@
> +.. This is the top level page for the 'interop' manual.
> +
> +
> +QEMU System Emulation Management and Interoperability Guide
> +===========================================================
> +
> +This manual contains documents and specifications that are useful
> +for making QEMU interoperate with other software.
> +
> +Contents:
> +
> +.. toctree::
> + :maxdepth: 2
> +
> + bitmaps
> + live-block-operations
> + pr-helper
> +
--
Alex Bennée
next prev parent reply other threads:[~2019-02-01 17:10 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-01 14:50 [Qemu-devel] [PATCH 00/11] Enable build and install of our rST docs Peter Maydell
2019-02-01 14:50 ` [Qemu-devel] [PATCH 01/11] docs/cpu-hotplug.rst: Fix rST markup issues Peter Maydell
2019-02-01 16:29 ` Alex Bennée
2019-02-01 14:50 ` [Qemu-devel] [PATCH 02/11] docs: Convert memory.txt to rst format Peter Maydell
2019-02-01 16:31 ` Alex Bennée
2019-02-01 14:50 ` [Qemu-devel] [PATCH 03/11] docs: Commit initial files from sphinx-quickstart Peter Maydell
2019-02-01 16:41 ` Alex Bennée
2019-02-01 16:46 ` Peter Maydell
2019-02-01 17:34 ` Peter Maydell
2019-02-01 14:50 ` [Qemu-devel] [PATCH 04/11] docs/conf.py: Disable unused _static directory Peter Maydell
2019-02-01 16:41 ` Alex Bennée
2019-02-01 14:50 ` [Qemu-devel] [PATCH 05/11] docs/conf.py: Configure the 'alabaster' theme Peter Maydell
2019-02-01 16:43 ` Alex Bennée
2019-02-28 13:39 ` Peter Maydell
2019-02-01 14:50 ` [Qemu-devel] [PATCH 06/11] docs/conf.py: Don't include rST sources in HTML build Peter Maydell
2019-02-01 16:43 ` Alex Bennée
2019-02-01 14:50 ` [Qemu-devel] [PATCH 07/11] docs/conf.py: Disable option warnings Peter Maydell
2019-02-01 16:44 ` Alex Bennée
2019-02-01 14:50 ` [Qemu-devel] [PATCH 08/11] Separate conf.py for each manual we want Peter Maydell
2019-02-01 16:58 ` Alex Bennée [this message]
2019-02-01 14:50 ` [Qemu-devel] [PATCH 09/11] Makefile, configure: Support building rST documentation Peter Maydell
2019-02-01 16:19 ` Alex Bennée
2019-02-01 16:25 ` Peter Maydell
2019-02-01 17:11 ` Alex Bennée
2019-02-01 17:16 ` Peter Maydell
2019-02-01 14:50 ` [Qemu-devel] [PATCH 10/11] Makefile: Abstract out "identify the pkgversion" code Peter Maydell
2019-02-01 16:59 ` Alex Bennée
2019-02-01 14:50 ` [Qemu-devel] [PATCH 11/11] docs/conf.py: Don't hard-code QEMU version Peter Maydell
2019-02-01 17:04 ` Alex Bennée
2019-02-01 15:05 ` [Qemu-devel] [PATCH 00/11] Enable build and install of our rST docs no-reply
2019-02-01 17:40 ` Peter Maydell
2019-02-01 15:09 ` no-reply
2019-02-01 16:56 ` no-reply
2019-02-01 17:14 ` no-reply
2019-02-01 17:15 ` no-reply
2019-02-01 17:17 ` no-reply
2019-02-01 17:18 ` no-reply
2019-02-01 17:19 ` no-reply
2019-02-01 17:22 ` no-reply
2019-02-01 17:29 ` no-reply
2019-02-01 17:33 ` no-reply
2019-02-01 17:34 ` no-reply
2019-02-01 17:37 ` no-reply
2019-02-01 17:48 ` no-reply
2019-02-03 15:14 ` no-reply
2019-02-14 11:29 ` Peter Maydell
2019-02-14 14:56 ` Marc-André Lureau
2019-02-14 15:24 ` Peter Maydell
2019-02-14 18:46 ` Paolo Bonzini
2019-02-14 19:00 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ef8rv42u.fsf@zen.linaroharston \
--to=alex.bennee@linaro.org \
--cc=marcandre.lureau@redhat.com \
--cc=patches@linaro.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.