From 1175c02506ffc9cef9f3c520249d8740a3174b1f Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 28 May 2018 18:21:50 +0900 Subject: 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 --- scripts/kconfig/zconf.l | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts/kconfig/zconf.l') 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 { -- cgit v1.2.3-59-g8ed1b