doc-rst: generic way to build only sphinx sub-folders
authorMarkus Heiser <markus.heiser@darmarIT.de>
Sat, 13 Aug 2016 14:12:42 +0000 (16:12 +0200)
committerJonathan Corbet <corbet@lwn.net>
Sun, 14 Aug 2016 17:51:51 +0000 (11:51 -0600)
commit606b9ac81a63ab3adb7e61206b9ae34ee186a89d
tree8ff0fcf5ec5d762a0ad7fc7e05fbbeb8d17f6801
parent3eb6cd6834c356f40e1633a0ced4ff9a4c59936b
doc-rst: generic way to build only sphinx sub-folders

Add a generic way to build only a reST sub-folder with or
without a individual *build-theme*.

* control *sub-folders* by environment SPHINXDIRS
* control *build-theme* by environment SPHINX_CONF

Folders with a conf.py file, matching $(srctree)/Documentation/*/conf.py
can be build and distributed *stand-alone*. E.g. to compile only the
html of 'media' and 'gpu' folder use::

  make SPHINXDIRS="media gpu" htmldocs

To use an additional sphinx-build configuration (*build-theme*) set the
name of the configuration file to SPHINX_CONF. E.g. to compile only the
html of 'media' with the *nit-picking* build use::

  make SPHINXDIRS=media SPHINX_CONF=conf_nitpick.py htmldocs

With this, the Documentation/conf.py is read first and updated with the
configuration values from the Documentation/media/conf_nitpick.py.

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/DocBook/Makefile
Documentation/Makefile.sphinx
Documentation/conf.py
Documentation/sphinx/load_config.py [new file with mode: 0644]