diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-05-28 11:21:50 +0200 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-05-28 20:31:19 +0200 |
commit | 1175c02506ffc9cef9f3c520249d8740a3174b1f (patch) | |
tree | 4d95574d080570461e3483ec3b916b867463c6f3 /scripts/kconfig/zconf.l | |
parent | kconfig: support user-defined function and recursively expanded variable (diff) | |
download | linux-1175c02506ffc9cef9f3c520249d8740a3174b1f.tar.xz linux-1175c02506ffc9cef9f3c520249d8740a3174b1f.zip |
kconfig: support simply expanded variable
The previous commit added variable and user-defined function. They
work similarly in the sense that the evaluation is deferred until
they are used.
This commit adds another type of variable, simply expanded variable,
as we see in Make.
The := operator defines a simply expanded variable, expanding the
righthand side immediately. This works like traditional programming
language variables.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/kconfig/zconf.l')
-rw-r--r-- | scripts/kconfig/zconf.l | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index dd08f7a38ccd..376af6cf2f65 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l @@ -114,7 +114,8 @@ n [A-Za-z0-9_-] yylval.string = text; return T_VARIABLE; } - "=" { BEGIN(ASSIGN_VAL); return T_ASSIGN; } + "=" { BEGIN(ASSIGN_VAL); yylval.flavor = VAR_RECURSIVE; return T_ASSIGN; } + ":=" { BEGIN(ASSIGN_VAL); yylval.flavor = VAR_SIMPLE; return T_ASSIGN; } [[:blank:]]+ . warn_ignored_character(*yytext); \n { |