diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-05-28 18:21:46 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-05-29 03:31:19 +0900 |
commit | 2fd5b09c201e20ab87299efd6a25f0bfc546e7c9 (patch) | |
tree | 712cb918bbc6c7f58314e03330ea51bec6612905 /init | |
parent | e298f3b49def8e67c2466bef8aed355462bfa7f1 (diff) | |
download | linux-2fd5b09c201e20ab87299efd6a25f0bfc546e7c9.tar.bz2 |
kconfig: add 'shell' built-in function
This accepts a single command to execute. It returns the standard
output from it.
[Example code]
config HELLO
string
default "$(shell,echo hello world)"
config Y
def_bool $(shell,echo y)
[Result]
$ make -s alldefconfig && tail -n 2 .config
CONFIG_HELLO="hello world"
CONFIG_Y=y
Caveat:
Like environments, functions are expanded in the lexer. You cannot
pass symbols to function arguments. This is a limitation to simplify
the implementation. I want to avoid the dynamic function evaluation,
which would introduce much more complexity.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions