diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-08-17 22:21:59 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2018-08-17 22:21:59 +0200 |
| commit | 3c5ae3f36cf626e79f281b80706b617b76f57060 (patch) | |
| tree | 56a2b7dbb1dba73606eb93dd193f7b1adb02c9f7 /kconfiglib.py | |
| parent | 5d973e81c192b8e214437317eb3834fba93f1f0f (diff) | |
rsource documentation nits
Fix some grammar nits, and add a motivation at the end (wanting to
create self-contained Kconfig trees that can appear anywhere relative to
the top-level Kconfig file).
Diffstat (limited to 'kconfiglib.py')
| -rw-r--r-- | kconfiglib.py | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index dbfeaff..0714d48 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -311,10 +311,10 @@ Kconfiglib implements two Kconfig extensions related to 'source': 'source' with relative path --------------------------- -The library implements a custom 'rsource' statement that allows to import -Kconfig file by specifying path relative to directory of the currently parsed -file, instead of path relative to project root. -This extension is not supported by Linux kernel tools (yet). +Kconfiglib supports a custom 'rsource' statement that sources Kconfig files +with a path relative to directory of the Kconfig file containing the 'rsource' +statement, instead of relative to the project root. This extension is not +supported by Linux kernel tools as of writing. Consider following directory tree: @@ -330,16 +330,21 @@ Consider following directory tree: +--ModuleA +--Kconfig -In above example, src/SubSystem1/Kconfig imports Kconfig for ModuleA. -With default 'source' it looks like: +In this example, assume that src/SubSystem1/Kconfig wants to source +src/SubSystem1/ModuleA/Kconfig. + +With 'source', the following statement would be used: source "src/SubSystem1/ModuleA/Kconfig" -Using 'rsource' it can be rewritten as: +Using 'rsource', it can be rewritten as: rsource "ModuleA/Kconfig" -If absolute path is given to 'rsource' then it follows behavior of 'source'. +If an absolute path is given to 'rsource', it acts the same as 'source'. + +'rsource' can be used to create "position-independent" Kconfig trees that can +be moved around freely. Globbed sourcing |
