summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/zconf.y
diff options
context:
space:
mode:
authorMichal Marek2010-09-27 23:24:53 +0200
committerMichal Marek2010-09-27 23:24:53 +0200
commit0455029bea7da2a2a92003238c9617a36d5d48fd (patch)
tree5dd4935db441dd443f38846236a8b353c9a92da1 /scripts/kconfig/zconf.y
parentkconfig: fix menuconfig on debian lenny (diff)
parentkbuild: migrate all arch to the kconfig mainmenu upgrade (diff)
downloadkernel-qcow2-linux-0455029bea7da2a2a92003238c9617a36d5d48fd.tar.gz
kernel-qcow2-linux-0455029bea7da2a2a92003238c9617a36d5d48fd.tar.xz
kernel-qcow2-linux-0455029bea7da2a2a92003238c9617a36d5d48fd.zip
Merge branch 'kbuild/kconfig/kbuild-generic-v7' of http://github.com/lacombar/linux-2.6 into kbuild/kconfig
* 'kbuild/kconfig/kbuild-generic-v7' of http://github.com/lacombar/linux-2.6: kbuild: migrate all arch to the kconfig mainmenu upgrade kconfig: expand file names kconfig: use the file's name of sourced file kconfig: constify file name kconfig: don't emit warning upon rootmenu's prompt redefinition kconfig: replace KERNELVERSION usage by the mainmenu's prompt kconfig: delay gconf window initialization kconfig: expand by default the rootmenu's prompt kconfig: add a symbol string expansion helper kconfig: regen parser kconfig: implement the `mainmenu' directive kconfig: allow PACKAGE to be defined on the compiler's command-line kconfig: rephrase help texts/comments not to include the package name kconfig: allow build-time definition of the internal config prefix kconfig: rephrase help text not to mention the internal prefix kconfig: replace a `switch()' statement by a more flexible `if()' statement
Diffstat (limited to 'scripts/kconfig/zconf.y')
-rw-r--r--scripts/kconfig/zconf.y18
1 files changed, 15 insertions, 3 deletions
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 23dfd3baa7a1..2abd3c7ff15d 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -36,7 +36,7 @@ static struct menu *current_menu, *current_entry;
#define YYERROR_VERBOSE
#endif
%}
-%expect 26
+%expect 28
%union
{
@@ -104,14 +104,15 @@ static struct menu *current_menu, *current_entry;
%}
%%
-input: stmt_list;
+input: nl start | start;
+
+start: mainmenu_stmt stmt_list | stmt_list;
stmt_list:
/* empty */
| stmt_list common_stmt
| stmt_list choice_stmt
| stmt_list menu_stmt
- | stmt_list T_MAINMENU prompt nl
| stmt_list end { zconf_error("unexpected end statement"); }
| stmt_list T_WORD error T_EOL { zconf_error("unknown statement \"%s\"", $2); }
| stmt_list option_name error T_EOL
@@ -342,6 +343,13 @@ if_block:
| if_block choice_stmt
;
+/* mainmenu entry */
+
+mainmenu_stmt: T_MAINMENU prompt nl
+{
+ menu_add_prompt(P_MENU, $2, NULL);
+};
+
/* menu entry */
menu: T_MENU prompt T_EOL
@@ -494,6 +502,10 @@ void conf_parse(const char *name)
prop = prop_alloc(P_DEFAULT, modules_sym);
prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0));
}
+
+ rootmenu.prompt->text = _(rootmenu.prompt->text);
+ rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text);
+
menu_finalize(&rootmenu);
for_all_symbols(i, sym) {
if (sym_check_deps(sym))