summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/zconf.l
diff options
context:
space:
mode:
authorMasahiro Yamada2018-05-28 11:21:51 +0200
committerMasahiro Yamada2018-05-28 20:31:19 +0200
commited2a22f277c60308481ecea1e1b846cbf249af41 (patch)
treede91d6e6c9f17a34aa5ef643468aca147b35d3e5 /scripts/kconfig/zconf.l
parentkconfig: support simply expanded variable (diff)
downloadkernel-qcow2-linux-ed2a22f277c60308481ecea1e1b846cbf249af41.tar.gz
kernel-qcow2-linux-ed2a22f277c60308481ecea1e1b846cbf249af41.tar.xz
kernel-qcow2-linux-ed2a22f277c60308481ecea1e1b846cbf249af41.zip
kconfig: support append assignment operator
Support += operator. This appends a space and the text on the righthand side to a variable. The timing of the evaluation of the righthand side depends on the flavor of the variable. If the lefthand side was originally defined as a simple variable, the righthand side is expanded immediately. Otherwise, the expansion is deferred. Appending something to an undefined variable results in a recursive variable. To implement this, we need to remember the flavor of variables. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/kconfig/zconf.l')
-rw-r--r--scripts/kconfig/zconf.l1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l
index 376af6cf2f65..a6cbe2d06d01 100644
--- a/scripts/kconfig/zconf.l
+++ b/scripts/kconfig/zconf.l
@@ -116,6 +116,7 @@ n [A-Za-z0-9_-]
}
"=" { BEGIN(ASSIGN_VAL); yylval.flavor = VAR_RECURSIVE; return T_ASSIGN; }
":=" { BEGIN(ASSIGN_VAL); yylval.flavor = VAR_SIMPLE; return T_ASSIGN; }
+ "+=" { BEGIN(ASSIGN_VAL); yylval.flavor = VAR_APPEND; return T_ASSIGN; }
[[:blank:]]+
. warn_ignored_character(*yytext);
\n {