diff options
author | Quentin Schulz <foss@0leil.net> | 2021-05-27 20:41:17 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-06-19 16:54:01 +0100 |
commit | 7d3f57cfd2e4322bcd96d67d330124f221a9aedd (patch) | |
tree | 5d07321b7c8bc59bb7fcc0372fab8b7a1966cf06 /documentation/ref-manual/tasks.rst | |
parent | 7a9b74e9d2a5cf3b1fb3ac7565c50eae6e0d4632 (diff) | |
download | poky-7d3f57cfd2e4322bcd96d67d330124f221a9aedd.tar.gz |
docs: replace ``FOO`` by :term:`FOO` where possible
If a variable has a glossary entry and some rST files write about those
variables, it's better to point to the glossary entry instead of just
highlighting it by surrounding it with two tick quotes.
This was automated by the following python script:
"""
import re
from pathlib import Path
with open('objects.inv.txt', 'r') as f:
objects = f.readlines()
with open('bitbake-objects.inv.txt', 'r') as f:
objects = objects + f.readlines()
re_term = re.compile(r'variables.html#term-([A-Z_0-9]*)')
terms = []
for obj in objects:
match = re_term.search(obj)
if match and match.group(1):
terms.append(match.group(1))
for rst in Path('.').rglob('*.rst'):
with open(rst, 'r') as f:
content = "".joing(f.readlines())
for term in terms:
content = re.sub(r'``({})``(?!.*\s*[~-]+)'.format(term), r':term:`\1`', content)
with open(rst, 'w') as f:
f.write(content)
"""
(From yocto-docs rev: ba49d9babfcb84bc5c26a68c8c3880a1d9c236d3)
Signed-off-by: Quentin Schulz <foss@0leil.net>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Reviewed-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/ref-manual/tasks.rst')
-rw-r--r-- | documentation/ref-manual/tasks.rst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/documentation/ref-manual/tasks.rst b/documentation/ref-manual/tasks.rst index 5bceb79b8d..970b083942 100644 --- a/documentation/ref-manual/tasks.rst +++ b/documentation/ref-manual/tasks.rst | |||
@@ -57,7 +57,7 @@ the current working directory set to ``${``\ :term:`B`\ ``}``. | |||
57 | The default behavior of this task is to run ``oe_runmake clean`` if a | 57 | The default behavior of this task is to run ``oe_runmake clean`` if a |
58 | makefile (``Makefile``, ``makefile``, or ``GNUmakefile``) is found and | 58 | makefile (``Makefile``, ``makefile``, or ``GNUmakefile``) is found and |
59 | :term:`CLEANBROKEN` is not set to "1". If no such | 59 | :term:`CLEANBROKEN` is not set to "1". If no such |
60 | file is found or the ``CLEANBROKEN`` variable is set to "1", the | 60 | file is found or the :term:`CLEANBROKEN` variable is set to "1", the |
61 | ``do_configure`` task does nothing. | 61 | ``do_configure`` task does nothing. |
62 | 62 | ||
63 | .. _ref-tasks-configure_ptest_base: | 63 | .. _ref-tasks-configure_ptest_base: |
@@ -308,17 +308,17 @@ This recipe has two patch files located here:: | |||
308 | 308 | ||
309 | poky/meta/recipes-connectivity/bluez5/bluez5 | 309 | poky/meta/recipes-connectivity/bluez5/bluez5 |
310 | 310 | ||
311 | In the ``bluez5`` recipe, the ``SRC_URI`` statements point to the source | 311 | In the ``bluez5`` recipe, the :term:`SRC_URI` statements point to the source |
312 | and patch files needed to build the package. | 312 | and patch files needed to build the package. |
313 | 313 | ||
314 | .. note:: | 314 | .. note:: |
315 | 315 | ||
316 | In the case for the ``bluez5_5.48.bb`` recipe, the ``SRC_URI`` statements | 316 | In the case for the ``bluez5_5.48.bb`` recipe, the :term:`SRC_URI` statements |
317 | are from an include file ``bluez5.inc``. | 317 | are from an include file ``bluez5.inc``. |
318 | 318 | ||
319 | As mentioned earlier, the build system treats files whose file types are | 319 | As mentioned earlier, the build system treats files whose file types are |
320 | ``.patch`` and ``.diff`` as patch files. However, you can use the | 320 | ``.patch`` and ``.diff`` as patch files. However, you can use the |
321 | "apply=yes" parameter with the ``SRC_URI`` statement to indicate any | 321 | "apply=yes" parameter with the :term:`SRC_URI` statement to indicate any |
322 | file as a patch file:: | 322 | file as a patch file:: |
323 | 323 | ||
324 | SRC_URI = " \ | 324 | SRC_URI = " \ |
@@ -329,7 +329,7 @@ file as a patch file:: | |||
329 | Conversely, if you have a directory full of patch files and you want to | 329 | Conversely, if you have a directory full of patch files and you want to |
330 | exclude some so that the ``do_patch`` task does not apply them during | 330 | exclude some so that the ``do_patch`` task does not apply them during |
331 | the patch phase, you can use the "apply=no" parameter with the | 331 | the patch phase, you can use the "apply=no" parameter with the |
332 | ``SRC_URI`` statement:: | 332 | :term:`SRC_URI` statement:: |
333 | 333 | ||
334 | SRC_URI = " \ | 334 | SRC_URI = " \ |
335 | git://path_to_repo/some_package \ | 335 | git://path_to_repo/some_package \ |
@@ -430,7 +430,7 @@ variable also plays a role in where unpacked source files ultimately | |||
430 | reside. For more information on how source files are unpacked, see the | 430 | reside. For more information on how source files are unpacked, see the |
431 | ":ref:`overview-manual/concepts:source fetching`" | 431 | ":ref:`overview-manual/concepts:source fetching`" |
432 | section in the Yocto Project Overview and Concepts Manual and also see | 432 | section in the Yocto Project Overview and Concepts Manual and also see |
433 | the ``WORKDIR`` and ``S`` variable descriptions. | 433 | the :term:`WORKDIR` and :term:`S` variable descriptions. |
434 | 434 | ||
435 | Manually Called Tasks | 435 | Manually Called Tasks |
436 | ===================== | 436 | ===================== |