summaryrefslogtreecommitdiff
path: root/Documentation/conf.py
AgeCommit message (Collapse)Author
2019-06-11docs: Fix conf.py for Sphinx 2.0Jonathan Corbet
commit 3bc8088464712fdcb078eefb68837ccfcc413c88 upstream. Our version check in Documentation/conf.py never envisioned a world where Sphinx moved beyond 1.x. Now that the unthinkable has happened, fix our version check to handle higher version numbers correctly. Cc: stable@vger.kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-12docs-rst: fix LaTeX \DURole renewcommand with Sphinx 1.3+Mauro Carvalho Chehab
commit e2a91f4f42018994d7424d405900d17eba6555d0 upstream. PDF build on Kernel 4.9-rc? returns an error with Sphinx 1.3.x and Sphinx 1.4.x, when trying to solve some cross-references. The solution is to redefine the \DURole macro. However, this is redefined too late. Move such redefinition to LaTeX preamble and bind it to just the Sphinx versions where the error is known to be present. Tested by building the documentation on interactive mode: make PDFLATEX=xelatex -C Documentation/output/./latex Fixes: e61a39baf74d ("[media] index.rst: Fix LaTeX error in interactive mode on Sphinx 1.4.x") Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-11Merge tag 'media/v4.9-1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - Documentation improvements: conversion of all non-DocBook documents to Sphinx and lots of fixes to the uAPI media book - New PCI driver for Techwell TW5864 media grabber boards - New SoC driver for ATMEL Image Sensor Controller - Removal of some obsolete SoC drivers (s5p-tv driver and soc_camera drivers) - Addition of ST CEC driver - Lots of drivers fixes, improvements and additions * tag 'media/v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (464 commits) [media] ttusb_dec: avoid the risk of go past buffer [media] cx23885: Fix some smatch warnings [media] si2165: switch to regmap [media] si2165: use i2c_client->dev instead of i2c_adapter->dev for logging [media] si2165: Remove legacy attach [media] cx231xx: attach si2165 driver via i2c_client [media] cx231xx: Prepare for attaching new style i2c_client DVB demod drivers [media] cx23885: attach si2165 driver via i2c_client [media] si2165: support i2c_client attach [media] si2165: avoid division by zero [media] rcar-vin: add R-Car gen2 fallback compatibility string [media] lgdt3306a: remove 20*50 msec unnecessary timeout [media] cx25821: Remove deprecated create_singlethread_workqueue [media] cx25821: Drop Freeing of Workqueue [media] cxd2841er: force 8MHz bandwidth for DVB-C if specified bw not supported [media] redrat3: hardware-specific parameters [media] redrat3: remove hw_timeout member [media] cxd2841er: BER and SNR reading for ISDB-T [media] dvb-usb: avoid link error with dib3000m{b,c| [media] dvb-usb: split out common parts of dibusb ...
2016-10-04Merge tag 'docs-4.9' of git://git.lwn.net/linuxLinus Torvalds
Pull documentation updates from Jonathan Corbet: "This is the documentation update pull for the 4.9 merge window. The Sphinx transition is still creating a fair amount of work. Here we have a number of fixes and, importantly, a proper PDF output solution, thanks to Jani Nikula, Mauro Carvalho Chehab and Markus Heiser. I've started a couple of new books: a driver API book (based on the old device-drivers.tmpl) and a development tools book. Both are meant to show how we can integrate together our existing documentation into a more coherent and accessible whole. It involves moving some stuff around and formatting changes, but, I think, the results are worth it. The good news is that most of our existing Documentation/*.txt files are *almost* in RST format already; the amount of messing around required is minimal. And, of course, there's the usual set of updates, typo fixes, and more" * tag 'docs-4.9' of git://git.lwn.net/linux: (120 commits) URL changed for Linux Foundation TAB dax : Fix documentation with respect to struct pages iio: Documentation: Correct the path used to create triggers. docs: Remove space-before-label guidance from CodingStyle docs-rst: add inter-document cross references Documentation/email-clients.txt: convert it to ReST markup Documentation/kernel-docs.txt: reorder based on timestamp Documentation/kernel-docs.txt: Add dates for online docs Documentation/kernel-docs.txt: get rid of broken docs Documentation/kernel-docs.txt: move in-kernel docs Documentation/kernel-docs.txt: remove more legacy references Documentation/kernel-docs.txt: add two published books Documentation/kernel-docs.txt: sort books per publication date Documentation/kernel-docs.txt: adjust LDD references Documentation/kernel-docs.txt: some improvements on the ReST output Documentation/kernel-docs.txt: Consistent indenting: 4 spaces Documentation/kernel-docs.txt: Add 4 paper/book references Documentation/kernel-docs.txt: Improve layouting of book list Documentation/kernel-docs.txt: Remove offline or outdated entries docs: Clean up bare :: lines ...
2016-09-20docs-rst: create a book for the development processMauro Carvalho Chehab
Now that the files at Documentation/development-process/ were converted to ReST, make create a book at Sphinx. As we'll have other books related to the development process, we'll add it as a sub-book. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22docs-rst: add media documentation to PDF outputMauro Carvalho Chehab
Now that the build of PDF output on media got fixed, re-add it to the Sphinx PDF build. Partially reverts 3eb6cd6834c3 ('Documentation: exclude media documentation from pdf generation'). Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22Merge branch 'doc/4.9' into docs-nextJonathan Corbet
2016-08-22docs-rst: add package adjustboxMauro Carvalho Chehab
We need adjustbox to allow adjusting the size of tables that are bigger than the line width. There are quite a few of them at the media books. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22docs-rst: Fix an warning when in interactive modeMauro Carvalho Chehab
When XeLaTeX is in interactive mode, it complains that py@noticelength already exists. Rename it and declare it only once to avoid such messages. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22docs-rst: Use better colors for note/warning/attention boxesMauro Carvalho Chehab
Instead of painting the box with gray, let's use a colored box. IMHO, that makes easier to warn users about some issue pointed by the Sphinx. It also matches to what we do already with the HTML output. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22docs-rst: conf.py: adjust the size of .. note:: tagMauro Carvalho Chehab
While the current implementation works well when using as a paragraph, it doesn't work properly if inside a table. As we have quite a few such cases, fix the logic to take the column size into account. PS.: I took the logic there from the latest version of Sphinx.sty Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22doc-rst: add boilerplate to customize c-domainMarkus Heiser
Add a sphinx-extension to customize the sphinx c-domain. No functional changes right yet, just the boilerplate code. Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de> [ jc: coding-style tweak ] Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-18Merge branch 'doc/4.9' into docs-nextJonathan Corbet
2016-08-18docs-rst: enable the Sphinx math extensionMauro Carvalho Chehab
This extension will be used by the media books. The name of the math image extension changed on Sphinx 1.4.x, according with: http://www.sphinx-doc.org/en/stable/ext/math.html#module-sphinx.ext.imgmath Let's autodetect, to keep building with versions < 1.4. Suggested-by: Markus Heiser <markus.heiser@darmarit.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-18docs-rst: better adjust margins and font sizeMauro Carvalho Chehab
As we have big tables, reduce the left/right margins and decrease the point size to 8pt. Visually, it is still good enough, and now less tables are too big to be displayed. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-18docs-rst: Don't mangle with UTF-8 chars on LaTeX/PDF outputMauro Carvalho Chehab
pdflatex doesn't accept using some UTF-8 chars, like "equal or less than" or "equal or greater than" chars. However, the media documents use them. So, we need to use XeLaTeX for conversion, and a font that accepts such characters. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-18docs-rst: improve output for .. notes:: on LaTeXMauro Carvalho Chehab
The output for those notes are bad in pdf, as they're not in a box with a different color. Also, it causes the output to not build if the note is inside a table. Change its implementation to avoid the above troubles. The logic there came from: https://stackoverflow.com/questions/606746/how-to-customize-an-existing-latex-environment-without-interfering-with-other-en Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-18docs-rst: allow generating some LaTeX pages in landscapeMauro Carvalho Chehab
Portrait is too small for some tables used at the media docs. So, allow documents to tell Sphinx to generate some pages in landscape by using: .. raw:: latex \begin{landscape} <some stuff> .. raw:: latex \end{landscape} Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-18docs-rst: remove a rst2pdf left over codeMauro Carvalho Chehab
The usage of rst2pdf was replaced by pdflatex on a previous patch. Remove the left-over code at conf.py. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-14Merge branch 'doc/4.9' into docs-nextJonathan Corbet
2016-08-14doc-rst: generic way to build only sphinx sub-foldersMarkus Heiser
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>
2016-08-12Merge branch 'doc/4.8-fixes' into docs-nextJonathan Corbet
2016-08-12Documentation: exclude media documentation from pdf generationJani Nikula
Although pdflatex is more robust than rst2pdf, building media documentation pdf still fails. Exclude media documentation from pdf generation for now. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Markus Heiser <markus.heiser@darmarit.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-12docs: Set the Sphinx default highlight language to "guess"Jonathan Corbet
This should eliminate a whole class of markup warnings, at the cost of occasionally amusing markup choices; we'll have to see if it works out. Suggested-by: Markus Heiser <markus.heiser@darmarIT.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-07-15doc-rst: Fix compilation of the pdf docbookMauro Carvalho Chehab
The rst2pdf tool is a very broken toolchain, with is not capable of parsing complex documents. As such, it doesn't build the media book, failing with: [ERROR] pdfbuilder.py:130 too many values to unpack (using rst2pdf version 0.93.dev-r0 and Sphinx version 1.4.5) So, make it build only the books we know that are safe to build. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> -- Btw, with the standard Sphinx version shipped on Fedora 24 (Sphinx 1.3.1), rst2pdf doesn't build even the simple kernel-documentation, failing with this error: writing Kernel... [ERROR] pdfbuilder.py:130 list index out of range This is a known bug: https://github.com/sphinx-doc/sphinx/issues/1844 So, maybe we should just disable pdf generation from RST for good, as I suspect that maintaining it with a broken toolchain will be a big headache.
2016-07-08doc-rst: linux_tv/Makefile: Honor quiet make O=dirMarkus Heiser
To honor the: make O=dir [targets] Locate all output files in "dir" * activate kernel-include directive * export BUILDDIR=$(BUILDDIR) * linux_tv: replace '.. include::' with '.. kernel-include:: $BUILDDIR/<foo.h.rst>' Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-05doc-rst: boilerplate HTML theme customizationMarkus Heiser
Implements the minimal boilerplate for Sphinx HTML theme customization. Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-06-30doc-rst: flat-table directive - initial implementationMarkus Heiser
Implements the reST flat-table directive. The ``flat-table`` is a double-stage list similar to the ``list-table`` with some additional features: * column-span: with the role ``cspan`` a cell can be extended through additional columns * row-span: with the role ``rspan`` a cell can be extended through additional rows * auto span rightmost cell of a table row over the missing cells on the right side of that table-row. With Option ``:fill-cells:`` this behavior can changed from *auto span* to *auto fill*, which automaticly inserts (empty) list tables The *list tables* formats are double stage lists. Compared to the ASCII-art they migth be less comfortable for readers of the text-files. Their advantage is, that they are easy to create/modify and that the diff of a modification is much more meaningfull, because it is limited to the modified content. The initial implementation was taken from the sphkerneldoc project [1] [1] https://github.com/return42/sphkerneldoc/commits/master/scripts/site-python/linuxdoc/rstFlatTable.py Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de> [jc: fixed typos and misspellings in the docs] Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-05-30Documentation/sphinx: set version and release properlyJani Nikula
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@intel.com>
2016-05-30Documentation/sphinx: configure the kernel-doc extensionJani 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@intel.com>
2016-05-30Documentation/sphinx: add basic working Sphinx configuration and buildJani 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@intel.com>