Commit Graph

4 Commits

Author SHA1 Message Date
Michael Opdenacker
eae7c2a0c2 manuals: fix name capitalization issues
- Using "BitBake" instead of "Bitbake" or "bitbake", aligning with the
  title of the "BitBake User Manual".
- Using "OpenEmbedded" instead of "Openembedded"
- Using "Python" instead of "python"

(From yocto-docs rev: 0b893e2a15aefedd7100445fc9d7eeed07b6afc6)

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-10 12:52:34 +01:00
Quentin Schulz
d97ad8cf1a docs: sphinx: yocto-vars: rebuild files when poky.yaml has changed
poky.yaml changes aren't detected by Sphinx by default.

In order to detect changes in poky.yaml, its md5sum is stored in the
app.outdir (BUILDDIR/html when building html) and checked against the
md5sum of the poky.yaml under use.

If the md5sum has changed, find all rst files in app.srcdir that have at
least an occurence of `&.*;` and mark them as requiring a rebuild.

(From yocto-docs rev: 59537c7fa49e3ea6918f45b3201ad16d56988b9b)

Signed-off-by: Quentin Schulz <foss@0leil.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-20 11:12:06 +01:00
Nicolas Dechesne
a69d74c842 sphinx: report errors when dependencies are not met
To build the Sphinx documentation, we have the following dependencies:
* sphinx
* sphinx_rtd_theme
* pyyaml

If any of these dependencies are missing, we might end up with some
cryptic error messages. This patch adds better error reporting when
dependencies are not met.

(From yocto-docs rev: 19df8d1ec56dc2ecb44122288cc53e84237fab69)

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-22 09:58:50 +01:00
Nicolas Dechesne
44e8d439aa sphinx: conf: add substitutions/global variables
The Yocto Project documentation makes heavy use of 'global'
variables. In Docbook these 'variables' are stored in the file
poky.ent. This Docbook feature is not handled automatically with
Pandoc. Sphinx has builtin support for substitutions however they are
local to each reST file by default. They can be made global by using
rst_prolog:

 rst_prolog
    A string of reStructuredText that will be included at the
    beginning of every source file that is read.

However Sphinx substitution feature has several important limitations. For
example, substitution does not work in code-block section.

yocto-vars.py is an extension that processes .rst file to find and
replace 'variables'. This plugin will do variables substitutions
whenever a rst file is read, so it happens before sphinx parses the
content.

All variables are set in poky.yaml. It's a simple YAML file with pairs
of variable/value, and the file is parsed once during setup. It's
important to note that variables can reference other
variables. poky.yaml was generated by converting poky.ent into a YAML
format.

To use a variable in the Yocto Project .rst files, make sure it is
defined in poky.yaml, and then you can use : &DISTRO_NAME;

For external links, Sphinx has a specific extension called extlinks,
let's use it instead of variable substituions. Note that we
intentionnally did not put the trailing '/' in the URL, this is to
allow us to use :yocto_git:`/` trick to get the actual URL displayed
in the HTML.

(From yocto-docs rev: dc5f53fae8fdfdda04285869dd1419107b920bfe)

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-17 10:09:33 +01:00