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/structure.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/structure.rst')
-rw-r--r-- | documentation/ref-manual/structure.rst | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/documentation/ref-manual/structure.rst b/documentation/ref-manual/structure.rst index 36c9efc1e2..5f00edb06c 100644 --- a/documentation/ref-manual/structure.rst +++ b/documentation/ref-manual/structure.rst | |||
@@ -251,9 +251,9 @@ variables are hard-coded for various reasons but such variables are | |||
251 | relatively rare. | 251 | relatively rare. |
252 | 252 | ||
253 | At a minimum, you would normally edit this file to select the target | 253 | At a minimum, you would normally edit this file to select the target |
254 | ``MACHINE``, which package types you wish to use | 254 | :term:`MACHINE`, which package types you wish to use |
255 | (:term:`PACKAGE_CLASSES`), and the location from | 255 | (:term:`PACKAGE_CLASSES`), and the location from |
256 | which you want to access downloaded files (``DL_DIR``). | 256 | which you want to access downloaded files (:term:`DL_DIR`). |
257 | 257 | ||
258 | If ``local.conf`` is not present when you start the build, the | 258 | If ``local.conf`` is not present when you start the build, the |
259 | OpenEmbedded build system creates it from ``local.conf.sample`` when you | 259 | OpenEmbedded build system creates it from ``local.conf.sample`` when you |
@@ -336,7 +336,7 @@ the build. | |||
336 | This directory contains downloaded upstream source tarballs. You can | 336 | This directory contains downloaded upstream source tarballs. You can |
337 | reuse the directory for multiple builds or move the directory to another | 337 | reuse the directory for multiple builds or move the directory to another |
338 | location. You can control the location of this directory through the | 338 | location. You can control the location of this directory through the |
339 | ``DL_DIR`` variable. | 339 | :term:`DL_DIR` variable. |
340 | 340 | ||
341 | .. _structure-build-sstate-cache: | 341 | .. _structure-build-sstate-cache: |
342 | 342 | ||
@@ -346,7 +346,7 @@ location. You can control the location of this directory through the | |||
346 | This directory contains the shared state cache. You can reuse the | 346 | This directory contains the shared state cache. You can reuse the |
347 | directory for multiple builds or move the directory to another location. | 347 | directory for multiple builds or move the directory to another location. |
348 | You can control the location of this directory through the | 348 | You can control the location of this directory through the |
349 | ``SSTATE_DIR`` variable. | 349 | :term:`SSTATE_DIR` variable. |
350 | 350 | ||
351 | .. _structure-build-tmp: | 351 | .. _structure-build-tmp: |
352 | 352 | ||
@@ -548,7 +548,7 @@ section in the Yocto Project Overview and Concepts Manual. | |||
548 | ------------------ | 548 | ------------------ |
549 | 549 | ||
550 | This directory contains general logs that are not otherwise placed using | 550 | This directory contains general logs that are not otherwise placed using |
551 | the package's ``WORKDIR``. Examples of logs are the output from the | 551 | the package's :term:`WORKDIR`. Examples of logs are the output from the |
552 | ``do_check_pkg`` or ``do_distro_check`` tasks. Running a build does not | 552 | ``do_check_pkg`` or ``do_distro_check`` tasks. Running a build does not |
553 | necessarily mean this directory is created. | 553 | necessarily mean this directory is created. |
554 | 554 | ||
@@ -569,7 +569,7 @@ It is worth considering the structure of a typical work directory. As an | |||
569 | example, consider ``linux-yocto-kernel-3.0`` on the machine ``qemux86`` | 569 | example, consider ``linux-yocto-kernel-3.0`` on the machine ``qemux86`` |
570 | built within the Yocto Project. For this package, a work directory of | 570 | built within the Yocto Project. For this package, a work directory of |
571 | ``tmp/work/qemux86-poky-linux/linux-yocto/3.0+git1+<.....>``, referred | 571 | ``tmp/work/qemux86-poky-linux/linux-yocto/3.0+git1+<.....>``, referred |
572 | to as the ``WORKDIR``, is created. Within this directory, the source is | 572 | to as the :term:`WORKDIR`, is created. Within this directory, the source is |
573 | unpacked to ``linux-qemux86-standard-build`` and then patched by Quilt. | 573 | unpacked to ``linux-qemux86-standard-build`` and then patched by Quilt. |
574 | (See the ":ref:`dev-manual/common-tasks:using quilt in your workflow`" section in | 574 | (See the ":ref:`dev-manual/common-tasks:using quilt in your workflow`" section in |
575 | the Yocto Project Development Tasks Manual for more information.) Within | 575 | the Yocto Project Development Tasks Manual for more information.) Within |
@@ -577,7 +577,7 @@ the ``linux-qemux86-standard-build`` directory, standard Quilt | |||
577 | directories ``linux-3.0/patches`` and ``linux-3.0/.pc`` are created, and | 577 | directories ``linux-3.0/patches`` and ``linux-3.0/.pc`` are created, and |
578 | standard Quilt commands can be used. | 578 | standard Quilt commands can be used. |
579 | 579 | ||
580 | There are other directories generated within ``WORKDIR``. The most | 580 | There are other directories generated within :term:`WORKDIR`. The most |
581 | important directory is ``WORKDIR/temp/``, which has log files for each | 581 | important directory is ``WORKDIR/temp/``, which has log files for each |
582 | task (``log.do_*.pid``) and contains the scripts BitBake runs for each | 582 | task (``log.do_*.pid``) and contains the scripts BitBake runs for each |
583 | task (``run.do_*.pid``). The ``WORKDIR/image/`` directory is where "make | 583 | task (``run.do_*.pid``). The ``WORKDIR/image/`` directory is where "make |
@@ -709,7 +709,7 @@ support for a new machine to the Yocto Project, look in this directory. | |||
709 | 709 | ||
710 | The contents of this directory controls any distribution-specific | 710 | The contents of this directory controls any distribution-specific |
711 | configurations. For the Yocto Project, the ``defaultsetup.conf`` is the | 711 | configurations. For the Yocto Project, the ``defaultsetup.conf`` is the |
712 | main file here. This directory includes the versions and the ``SRCDATE`` | 712 | main file here. This directory includes the versions and the :term:`SRCDATE` |
713 | definitions for applications that are configured here. An example of an | 713 | definitions for applications that are configured here. An example of an |
714 | alternative configuration might be ``poky-bleeding.conf``. Although this | 714 | alternative configuration might be ``poky-bleeding.conf``. Although this |
715 | file mainly inherits its configuration from Poky. | 715 | file mainly inherits its configuration from Poky. |