summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/zconf.y
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 17:29:43 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 17:29:43 -0700
commitf05c463be51898e745c4aa8245b05e25d73fa975 (patch)
tree7a5502f06f113eef9bef25c6a33cc6a419953b4a /scripts/kconfig/zconf.y
parent8da56309f04d76a474791fd27b33ddd52062bcd6 (diff)
parent5a1aa8a1aff6191ecc55f21d8b5f0e47108ed91b (diff)
downloadlinux-stable-f05c463be51898e745c4aa8245b05e25d73fa975.tar.gz
linux-stable-f05c463be51898e745c4aa8245b05e25d73fa975.tar.bz2
linux-stable-f05c463be51898e745c4aa8245b05e25d73fa975.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: kconfig: add named choice group kconfig: fix choice dependency check kconifg: 'select' considered less evil dontdiff: ignore timeconst.h dontdiff: add modules.order kbuild: fix unportability in gen_initramfs_list.sh kbuild: fix help output to show correct arch kbuild: show defconfig subdirs in make help kconfig: reversed borderlines in inputbox
Diffstat (limited to 'scripts/kconfig/zconf.y')
-rw-r--r--scripts/kconfig/zconf.y13
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index d9b96ba8e38c..9710b82466f2 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -91,7 +91,7 @@ static struct menu *current_menu, *current_entry;
%type <id> end
%type <id> option_name
%type <menu> if_entry menu_entry choice_entry
-%type <string> symbol_option_arg
+%type <string> symbol_option_arg word_opt
%destructor {
fprintf(stderr, "%s:%d: missing end statement for this entry\n",
@@ -239,10 +239,10 @@ symbol_option_arg:
/* choice entry */
-choice: T_CHOICE T_EOL
+choice: T_CHOICE word_opt T_EOL
{
- struct symbol *sym = sym_lookup(NULL, 0);
- sym->flags |= SYMBOL_CHOICE;
+ struct symbol *sym = sym_lookup($2, SYMBOL_CHOICE);
+ sym->flags |= SYMBOL_AUTO;
menu_add_entry(sym);
menu_add_expr(P_CHOICE, NULL, NULL);
printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno());
@@ -456,9 +456,12 @@ expr: symbol { $$ = expr_alloc_symbol($1); }
;
symbol: T_WORD { $$ = sym_lookup($1, 0); free($1); }
- | T_WORD_QUOTE { $$ = sym_lookup($1, 1); free($1); }
+ | T_WORD_QUOTE { $$ = sym_lookup($1, SYMBOL_CONST); free($1); }
;
+word_opt: /* empty */ { $$ = NULL; }
+ | T_WORD
+
%%
void conf_parse(const char *name)