01 Sep, 2016

1 commit

  • This extends the method to build only sub-folders to the targets
    "latexdocs" and "pdfdocs". To do so, a conf.py in the sub-folder is
    required, where the latex_documents of the sub-folder are
    defined. E.g. to build only gpu's PDF add the following to the
    Documentation/gpu/conf.py::

    +latex_documents = [
    + ("index", "gpu.tex", "Linux GPU Driver Developer's Guide",
    + "The kernel development community", "manual"),
    +]

    and run:

    make SPHINXDIRS=gpu pdfdocs

    Signed-off-by: Markus Heiser
    Signed-off-by: Jonathan Corbet

    Markus Heiser
     

23 Aug, 2016

1 commit


19 Aug, 2016

3 commits


15 Aug, 2016

1 commit

  • 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
    Signed-off-by: Jonathan Corbet

    Markus Heiser
     

13 Aug, 2016

2 commits


07 Aug, 2016

1 commit

  • Pull documentation fixes from Jonathan Corbet:
    "Three fixes for the docs build, including removing an annoying warning
    on 'make help' if sphinx isn't present"

    * tag 'doc-4.8-fixes' of git://git.lwn.net/linux:
    DocBook: use DOCBOOKS="" to ignore DocBooks instead of IGNORE_DOCBOOKS=1
    Documenation: update cgroup's document path
    Documentation/sphinx: do not warn about missing tools in 'make help'

    Linus Torvalds
     

04 Aug, 2016

1 commit


29 Jul, 2016

1 commit

  • Now that all media documentation was converted to Sphinx, we
    should get rid of the old DocBook one, as we don't want people
    to submit patches against the old stuff.

    Signed-off-by: Mauro Carvalho Chehab
    Acked-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

15 Jul, 2016

1 commit


08 Jul, 2016

3 commits


07 Jul, 2016

1 commit


02 Jul, 2016

2 commits

  • If the user requested specific DocBooks to be built using 'make
    DOCBOOKS=foo.xml htmldocs', assume no Sphinx build is desired. This
    check is transitional, and can be removed once we drop the DocBook
    build.

    Cc: Markus Heiser
    Cc: Mauro Carvalho Chehab
    Fixes: 22cba31bae9d ("Documentation/sphinx: add basic working Sphinx configuration and build")
    Signed-off-by: Jani Nikula
    Signed-off-by: Jonathan Corbet

    Jani Nikula
     
  • This was broken when updating the documentation targets for the Sphinx
    build, and moving from %docs target pattern to explicitly listed
    targets.

    Cc: Markus Heiser
    Cc: Mauro Carvalho Chehab
    Fixes: 22cba31bae9d ("Documentation/sphinx: add basic working Sphinx configuration and build")
    Signed-off-by: Jani Nikula
    Signed-off-by: Jonathan Corbet

    Jani Nikula
     

23 Jun, 2016

1 commit


30 May, 2016

3 commits

  • Read the version and release from the top level Makefile (for use when
    Sphinx is invoked directly, by e.g. Read the Docs), but override them
    via Sphinx command line arguments in a normal documentation build.

    Signed-off-by: Jani Nikula

    Jani Nikula
     
  • Tell Sphinx where to find the extension, and pass on the kernel src tree
    and kernel-doc paths to the extension.

    With this, any .rst files under Documentation may contain the kernel-doc
    rst directive to include kernel-doc documentation from any source file.

    While building, it may be handy to pass kernel-doc extension
    configuration on the command line. For example, 'make SPHINXOPTS="-D
    kerneldoc_verbosity=0" htmldocs' silences all stderr output from
    kernel-doc when the kernel-doc exit code is 0. (The stderr will be
    logged unconditionally when the exit code is non-zero.)

    Signed-off-by: Jani Nikula

    Jani Nikula
     
  • Add basic configuration and makefile to build documentation from any
    .rst files under Documentation using Sphinx. For starters, there's just
    the placeholder index.rst.

    At the top level Makefile, hook Sphinx documentation targets alongside
    (but independent of) the DocBook toolchain, having both be run on the
    various 'make *docs' targets.

    All Sphinx processing is placed into Documentation/Makefile.sphinx. Both
    that and the Documentation/DocBook/Makefile are now expected to handle
    all the documentation targets, explicitly ignoring them if they're not
    relevant for that particular toolchain. The changes to the existing
    DocBook Makefile are kept minimal.

    There is graceful handling of missing Sphinx and rst2pdf (which is
    needed for pdf output) by checking for the tool and python module,
    respectively, with informative messages to the user.

    If the Read the Docs theme (sphinx_rtd_theme) is available, use it, but
    otherwise gracefully fall back to the Sphinx default theme, with an
    informative message to the user, and slightly less pretty HTML output.

    Sphinx can now handle htmldocs, pdfdocs (if rst2pdf is available),
    epubdocs and xmldocs targets. The output documents are written into per
    output type subdirectories under Documentation/output.

    Finally, you can pass options to sphinx-build using the SPHINXBUILD make
    variable. For example, 'make SPHINXOPTS=-v htmldocs' for more verbose
    output from Sphinx.

    This is based on the original work by Jonathan Corbet, but he probably
    wouldn't recognize this as his own anymore.

    Signed-off-by: Jani Nikula

    Jani Nikula