|
1 | 1 | # meta-bitbake-variable-substitution
|
2 |
| -Expands bitbake variables in external source/scripts. |
| 2 | +Automatically expand bitbake variables inside source/scripts. |
3 | 3 |
|
4 | 4 | ## Overview
|
5 |
| -* delimited bitbake variables in external source/scripts will be replaced with the expanded value of that bitbake variable |
| 5 | +* delimited bitbake variables in source/scripts will be replaced with the expanded value of that bitbake variable |
6 | 6 | * Example: ``@@sbindir@@`` will be replaced with ``/usr/sbin``
|
7 |
| -* delimiter defaults to ``@@``. This can be overriden with the variable ``BITBAKE_VAR_SUB_DELIM`` |
8 | 7 | * files in ``FILES_${PN}`` are expanded automatically, during ``do_install:append()``
|
9 |
| -* files in ``SRC_URI`` are expanded automatically, during ``do_compile:prepend()`` |
10 |
| -* any file can be processed with an explict function call |
11 |
| -* see [Using Layer](#Using-Layer) for more info |
| 8 | +* files in ``SRC_URI`` are expanded automatically, during ``do_patch:append()`` |
| 9 | +* any file can be processed with an explict function call inside bitbake recipe |
12 | 10 |
|
13 |
| -## Dependencies |
14 |
| -This layer depends on: |
15 |
| - |
16 |
| - URI: git://git.openembedded.org/bitbake |
17 |
| - |
18 |
| - URI: git://git.openembedded.org/openembedded-core |
19 |
| - layers: meta |
20 |
| - branch: master |
21 |
| - |
22 |
| -## Installation |
23 |
| -### Add Layer to Build |
24 |
| -In order to use this layer, the build system must be aware of it. |
25 |
| - |
26 |
| -Assuming this layer exists at the top-level of the yocto build tree; add the location of this layer to ``bblayers.conf``, along with any additional layers needed: |
27 |
| - |
28 |
| - BBLAYERS ?= " \ |
29 |
| - /path/to/yocto/meta \ |
30 |
| - /path/to/yocto/meta-poky \ |
31 |
| - /path/to/yocto/meta-yocto-bsp \ |
32 |
| - /path/to/yocto/meta-bitbake-variable-substitution \ |
33 |
| - " |
34 |
| - |
35 |
| -Alternatively, run bitbake-layers to add: |
36 |
| - |
37 |
| - $ bitbake-layers add-layer /path/to/yocto/meta-bitbake-variable-substitution |
38 |
| - |
39 |
| -### Configuration |
| 11 | +## Configuration |
40 | 12 | | Variable | Default | Description |
|
41 | 13 | | --- | --- | --- |
|
42 | 14 | | ``BITBAKE_VAR_SUB_DELIM`` | ``@@`` | strings sandwiched between this delim will be replaced w/ value of bitbake variable of same name |
|
43 |
| -| ``BITBAKE_VAR_SUB_MISSING_VAR_FATAL`` | ``1`` | missing bitbake variables will be a fatal error | |
| 15 | +| ``BITBAKE_VAR_SUB_MISSING_VAR_FATAL`` | ``1`` | missing bitbake variables will cause a fatal error | |
44 | 16 |
|
45 |
| -## Using Layer |
| 17 | +## Usage |
| 18 | +### Automatic Expansion |
46 | 19 | To automatically process files, add ``inherit bitbake-variable-substitution`` to recipe.
|
47 | 20 |
|
48 |
| -Alternatively, a more measured approach may be preferred, especially if `FILES_${PN}` or `SRC_URI` is trashy/bloated. To explicitly/manually select files to process: |
| 21 | +### Explicit Expansion |
| 22 | +Alternatively, a more measured approach may be preferred. Especially useful if `FILES_${PN}` or `SRC_URI` is trashy/bloated. |
| 23 | + |
| 24 | +To explicitly/manually select files to process: |
49 | 25 |
|
50 | 26 | # inherit helpers class in recipe
|
51 | 27 | inherit bitbake-variable-substitution-helpers
|
|
0 commit comments