aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/zconf.l
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-05-28 18:21:50 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-05-29 03:31:19 +0900
commit1175c02506ffc9cef9f3c520249d8740a3174b1f (patch)
tree4d95574d080570461e3483ec3b916b867463c6f3 /scripts/kconfig/zconf.l
parentkconfig: support user-defined function and recursively expanded variable (diff)
downloadlinux-dev-1175c02506ffc9cef9f3c520249d8740a3174b1f.tar.xz
linux-dev-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.l3
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 {