doc-rst: add kernel-include directive
authorMarkus Heiser <markus.heiser@darmarIT.de>
Fri, 8 Jul 2016 12:15:04 +0000 (14:15 +0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 8 Jul 2016 12:31:04 +0000 (09:31 -0300)
commit037763785a88ebca791f9c66ab2fde4ed43b408f
treed0c8caec35b737afef43fa71529a57f9bf8ced49
parent580e96c78bd62b94c9178ef60f85380685264269
doc-rst: add kernel-include directive

The kernel-include directive is needed to include the auto generated rst
content from a build (pre-) process. E.g. the linux_tv Makefile
generates intermediate reST-files from header files. Since there is a O=
option:

  make O=dir [targets] Locate all output files in "dir"

We need to include intermediate reST files from arbitrary (O=/tmp/foo)
locations:

The 'kernel-include' reST-directive is a replacement for the 'include'
directive. The 'kernel-include' directive expand environment variables
in the path name and allows to include files from arbitrary locations.

.. hint::

  Including files from arbitrary locations (e.g. from '/etc') is a
  security risk for builders. This is why the 'include' directive from
  docutils *prohibit* pathnames pointing to locations *above* the
  filesystem tree where the reST document with the include directive is
  placed.

Substrings of the form $name or ${name} are replaced by the value of
environment variable name. Malformed variable names and references to
non-existing variables are left unchanged.

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Documentation/sphinx/kernel_include.py [new file with mode: 0755]