diff options
author | Nicolas Dechesne <nicolas.dechesne@linaro.org> | 2020-07-24 16:27:54 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-17 10:09:33 +0100 |
commit | c473fa229239752367c5d573160fc8738cf1907e (patch) | |
tree | f8520ba3aa3cf911333dbd31e38e9a52203a0285 /documentation/adt-manual/adt-command.rst | |
parent | 4cd953989de42c7a83f666c23e077d53b016a1f1 (diff) | |
download | poky-c473fa229239752367c5d573160fc8738cf1907e.tar.gz |
sphinx: fix internal links
Many of the internal links were not converted probably from DocBook
using pandoc. After looking at the various patterns, the follow series
of 'naive' Python regexp were used to perform some additional
automatic conversion.
Also, since we rely on built-in glossary, all links to terms need to
use the sphinx :term: syntax.
This commit is generated using the following Python series of regexp:
line = re.sub("`+(\w+)`* <(\&YOCTO_DOCS_REF_URL;)?#var-\\1>`__",
":term:`\\1`",
line)
line = re.sub("`+do_([a-z_]+)`* <(\&YOCTO_DOCS_REF_URL;)?#ref-tasks-\\1>`__",
":ref:`ref-tasks-\\1`",
line)
line = re.sub("`+([a-z_\-\*\.]+).bbclass`* <(\&YOCTO_DOCS_REF_URL;)?#ref-classes-\\1>`__",
":ref:`\\1.bbclass <ref-classes-\\1>`",
line)
line = re.sub("`+([a-z_\-\*\.]+)`* <(\&YOCTO_DOCS_REF_URL;)?#ref-classes-\\1>`__",
":ref:`\\1 <ref-classes-\\1>`",
line)
line = re.sub("`Source Directory <(\&YOCTO_DOCS_REF_URL;)?#source-directory>`__",
":term:`Source Directory`",
line)
line = re.sub("`Build Directory <(\&YOCTO_DOCS_REF_URL;)?#build-directory>`__",
":term:`Build Directory`",
line)
line = re.sub("`Metadata <(\&YOCTO_DOCS_REF_URL;)?#metadata>`__",
":term:`Metadata`",
line)
line = re.sub("`BitBake <(\&YOCTO_DOCS_REF_URL;)?#bitbake-term>`__",
":term:`BitBake`",
line)
line = re.sub("`Images <(\&YOCTO_DOCS_REF_URL;)?#ref-images>`__",
":ref:`ref-manual/ref-images:Images`",
line)
line = re.sub("`Classes <(\&YOCTO_DOCS_REF_URL;)?#ref-classes>`__",
":ref:`ref-manual/ref-classes:Classes`",
line)
line = re.sub("`workspace <(\&YOCTO_DOCS_REF_URL;)?#devtool-the-workspace-layer-structure>`__",
":ref:`devtool-the-workspace-layer-structure`",
line)
line = re.sub("`Open-?Embedded b?B?uild s?S?ystem <(\&YOCTO_DOCS_REF_URL;)?#build-system-term>`__",
":term:`OpenEmbedded Build System`",
line)
line = re.sub("`(OpenEmbedded-Core )?(\(?OE-Core\)? )?<(\&YOCTO_DOCS_REF_URL;)?#oe-core>`__",
":term:`OpenEmbedded-Core (OE-Core)`",
line)
It won't catch multiline strings, but it catches a very large number
of occurences!
(From yocto-docs rev: 3f537d17de5b1fb76ba3bee196481984a4826378)
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/adt-manual/adt-command.rst')
-rw-r--r-- | documentation/adt-manual/adt-command.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/documentation/adt-manual/adt-command.rst b/documentation/adt-manual/adt-command.rst index 2b81016b68..8b86544f19 100644 --- a/documentation/adt-manual/adt-command.rst +++ b/documentation/adt-manual/adt-command.rst | |||
@@ -85,7 +85,7 @@ Follow these steps to create a simple Autotools-based project: | |||
85 | 85 | ||
86 | 7. *Cross-compile the project:* This command compiles the project using | 86 | 7. *Cross-compile the project:* This command compiles the project using |
87 | the cross-compiler. The | 87 | the cross-compiler. The |
88 | ```CONFIGURE_FLAGS`` <&YOCTO_DOCS_REF_URL;#var-CONFIGURE_FLAGS>`__ | 88 | :term:`CONFIGURE_FLAGS` |
89 | environment variable provides the minimal arguments for GNU | 89 | environment variable provides the minimal arguments for GNU |
90 | configure: $ ./configure ${CONFIGURE_FLAGS} | 90 | configure: $ ./configure ${CONFIGURE_FLAGS} |
91 | 91 | ||
@@ -146,13 +146,13 @@ subject to general ``make`` rules. | |||
146 | 146 | ||
147 | To illustrate this, consider the following four cross-toolchain | 147 | To illustrate this, consider the following four cross-toolchain |
148 | environment variables: | 148 | environment variables: |
149 | `CC <&YOCTO_DOCS_REF_URL;#var-CC>`__\ =i586-poky-linux-gcc -m32 | 149 | :term:`CC`\ =i586-poky-linux-gcc -m32 |
150 | -march=i586 --sysroot=/opt/poky/1.8/sysroots/i586-poky-linux | 150 | -march=i586 --sysroot=/opt/poky/1.8/sysroots/i586-poky-linux |
151 | `LD <&YOCTO_DOCS_REF_URL;#var-LD>`__\ =i586-poky-linux-ld | 151 | :term:`LD`\ =i586-poky-linux-ld |
152 | --sysroot=/opt/poky/1.8/sysroots/i586-poky-linux | 152 | --sysroot=/opt/poky/1.8/sysroots/i586-poky-linux |
153 | `CFLAGS <&YOCTO_DOCS_REF_URL;#var-CFLAGS>`__\ =-O2 -pipe -g | 153 | :term:`CFLAGS`\ =-O2 -pipe -g |
154 | -feliminate-unused-debug-types | 154 | -feliminate-unused-debug-types |
155 | `CXXFLAGS <&YOCTO_DOCS_REF_URL;#var-CXXFLAGS>`__\ =-O2 -pipe -g | 155 | :term:`CXXFLAGS`\ =-O2 -pipe -g |
156 | -feliminate-unused-debug-types Now, consider the following three cases: | 156 | -feliminate-unused-debug-types Now, consider the following three cases: |
157 | 157 | ||
158 | - *Case 1 - No Variables Set in the ``Makefile``:* Because these | 158 | - *Case 1 - No Variables Set in the ``Makefile``:* Because these |