diff options
author | Ryan Roberts <ryan.roberts@arm.com> | 2022-09-27 14:29:31 +0100 |
---|---|---|
committer | Ryan Roberts <ryan.roberts@arm.com> | 2022-11-02 14:48:39 +0000 |
commit | 79a55980e99967447ef450a7bb522913c65324e6 (patch) | |
tree | cc38e65cc1265b9ac4659b3e7f7d8ae18c0de4fa | |
parent | 001426dd3cc45a84a7293154c966eeae3227657b (diff) |
config: Add ${param:configdir} macro.
This allows configs to look up and use files in the config store. Usable
only during build.
Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
-rw-r--r-- | documentation/userguide/config.rst | 1 | ||||
-rw-r--r-- | shrinkwrap/utils/config.py | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/documentation/userguide/config.rst b/documentation/userguide/config.rst index df7779b..476c2c2 100644 --- a/documentation/userguide/config.rst +++ b/documentation/userguide/config.rst @@ -127,6 +127,7 @@ macro scope ======================= ================================================================== ==== ``${param:sourcedir}`` build.<component>.{params, prebuild, build, postbuild, artifacts} Directory in which the component's source code is located. ``${param:builddir}`` build.<component>.{params, prebuild, build, postbuild, artifacts} Directory in which the component should be built, if the component's build system supports separation of source and build trees. +``${param:configdir}`` build.<component>.{params, prebuild, build, postbuild, artifacts} Directory containing the config store. ``${param:packagedir}`` build.<component>.{params, prebuild, build, postbuild, artifacts} Directory in which all artifacts from the config build are packaged to and accessed from during run. ``${param:packagedir}`` run.{params, rtvars, prerun} Directory in which all artifacts from the config build are packaged to and accessed from during run. ``${param:jobs}`` build.<component>.{params, prebuild, build, postbuild} Maximum number of low level parallel jobs specified on the command line. To be passed to (e.g.) make as ``-j${param:jobs}``. diff --git a/shrinkwrap/utils/config.py b/shrinkwrap/utils/config.py index 35f0730..a088643 100644 --- a/shrinkwrap/utils/config.py +++ b/shrinkwrap/utils/config.py @@ -422,6 +422,7 @@ def resolveb(config, clivars={}): 'packagedir': os.path.join( workspace.package, config['name']), + 'configdir': workspace.config, }, } @@ -448,6 +449,7 @@ def resolveb(config, clivars={}): 'packagedir': os.path.join( workspace.package, config['name']), + 'configdir': workspace.config, }, } |