Kconfig generalization
Subsystems (16)
cover Kconfig generalization
Hi Sam, Michal,
You'll find hereafter the series for kconfig generalization and interfaces changes with the rest of the kernel.
A quick summary of the serie is:
- patch 1 -> 3: handles the CONFIG_ prefix, its build time definition and its
mention in help text.
- patch 4: handles the reference to the 'kernel' keyword in various strings.
- patch 5: takes care of the "linux" domain name used to get translation informations.
- patch 6 -> 15 handles the mainmenu syntax changes and related.
This series is available in the git repository at:
git://github.com/lacombar/linux-2.6.git kbuild-generic-v5
Comments welcome !
Thanks in advance,
- Arnaud
Arnaud Lacombe (15):
kconfig: replace a switch()' statement by a more flexible if()'
statement
kconfig: rephrase help text not to mention the internal prefix
kconfig: allow build-time definition of the internal config prefix
kconfig: rephrase help texts/comments not to include the package name
kconfig: allow PACKAGE to be defined on the compiler's command-line
kconfig: implement the `mainmenu' directive
kconfig: add a symbol string expansion helper
kconfig: expand by default the rootmenu's prompt
kconfig: replace KERNELVERSION usage by the mainmenu's prompt
kconfig: don't emit warning upon rootmenu's prompt redefinition
kconfig: constify file name
kconfig: use the file's name of sourced file
kconfig: expand file names
kconfig: regen parser
kbuild: migrate all arch to the kconfig mainmenu upgrade
Documentation/kbuild/kconfig-language.txt | 3 +- Kconfig | 11 + arch/alpha/Kconfig | 4 - arch/arm/Kconfig | 7 - arch/avr32/Kconfig | 7 - arch/blackfin/Kconfig | 7 - arch/cris/Kconfig | 7 - arch/frv/Kconfig | 6 - arch/h8300/Kconfig | 7 - arch/ia64/Kconfig | 7 - arch/m32r/Kconfig | 7 - arch/m68k/Kconfig | 6 - arch/m68knommu/Kconfig | 7 - arch/microblaze/Kconfig | 5 - arch/mips/Kconfig | 2 - arch/mn10300/Kconfig | 9 - arch/parisc/Kconfig | 7 - arch/powerpc/Kconfig | 6 - arch/s390/Kconfig | 7 - arch/score/Kconfig | 5 - arch/sh/Kconfig | 7 - arch/sparc/Kconfig | 6 - arch/tile/Kconfig | 2 - arch/um/Kconfig.common | 2 - arch/x86/Kconfig | 3 - arch/xtensa/Kconfig | 5 - scripts/kconfig/Makefile | 2 +- scripts/kconfig/conf.c | 13 +- scripts/kconfig/confdata.c | 77 ++--- scripts/kconfig/expr.h | 2 +- scripts/kconfig/gconf.c | 8 +- scripts/kconfig/lex.zconf.c_shipped | 5 +- scripts/kconfig/lkc.h | 6 + scripts/kconfig/lkc_proto.h | 1 + scripts/kconfig/mconf.c | 64 ++-- scripts/kconfig/menu.c | 4 +- scripts/kconfig/nconf.c | 73 ++--- scripts/kconfig/qconf.cc | 6 +- scripts/kconfig/symbol.c | 49 +++ scripts/kconfig/util.c | 7 +- scripts/kconfig/zconf.l | 5 +- scripts/kconfig/zconf.tab.c_shipped | 547 +++++++++++++++-------------- scripts/kconfig/zconf.y | 18 +- 43 files changed, 489 insertions(+), 550 deletions(-) create mode 100644 Kconfig
Signature · 1 line
1.7.2.30.gc37d7.dirty
PATCH 1/15 kconfig: replace a `switch()' statement by a more flexible `if()' statement
With the upcoming dynamical configuration prefix, we can no longer assume that the prefix will start by a 'C'. As such, we can no longer hardcode this value in the case ...:', so replace the switch() { ... }' statement by a more flexible 'if () { ... }' statement.
--- scripts/kconfig/confdata.c | 19 +++++-------------- 1 files changed, 5 insertions(+), 14 deletions(-)
scripts/kconfig/confdata.c +5 -14
@@ -221,8 +221,7 @@ load:while (fgets (line,sizeof (line), in)) { conf_lineno++; sym =NULL ; -switch (line[0 ]) { -case '#' : +if (line[0 ] =='#' ) {if (memcmp (line +2 ,"CONFIG_" ,7 ))continue ; p =strchr (line +9 ,' ' );
@@ -254,12 +253,7 @@ load:default : ; } -break ; -case 'C' : -if (memcmp (line,"CONFIG_" ,7 )) { -conf_warning ("unexpected data" ); -continue ; - } + }else if (memcmp (line,"CONFIG_" ,7 ) ==0 ) { p =strchr (line +7 ,'=' );if (!p)continue ;
@@ -286,12 +280,9 @@ load: }if (conf_set_sym_val (sym, def, def_flags, p))continue ; -break ; -case '\r' : -case '\n' : -break ; -default : -conf_warning ("unexpected data" ); + }else { +if (line[0 ] !='\r' && line[0 ] !='\n' ) +conf_warning ("unexpected data" );continue ; }if (sym &&sym_is_choice_value (sym)) {
Signature · 1 line
1.7.2.30.gc37d7.dirty
PATCH 2/15 kconfig: rephrase help text not to mention the internal prefix
In reply to Arnaud Lacombe--- scripts/kconfig/mconf.c | 10 +++++----- scripts/kconfig/nconf.c | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-)
scripts/kconfig/mconf.c +5 -5
@@ -232,7 +232,7 @@ save_config_help[] = N_( "leave this blank.\n"), search_help[] = N_("\n" -"Search for CONFIG_ symbols and display their relations.\n" +"Search for symbols and display their relations.\n" "Regular expressions are allowed.\n" "Example: search for \"^FOO\"\n" "Result:\n"
@@ -249,7 +249,7 @@ search_help[] = N_("Selected by: BAR\n" "-----------------------------------------------------------------\n" "o The line 'Prompt:' shows the text used in the menu structure for\n" -" this CONFIG_ symbol\n" +" this symbol\n" "o The 'Defined at' line tell at what file / line number the symbol\n" " is defined\n" "o The 'Depends on:' line tell what symbols needs to be defined for\n"
@@ -265,9 +265,9 @@ search_help[] = N_("Only relevant lines are shown.\n" "\n\n" "Search examples:\n" -"Examples: USB => find all CONFIG_ symbols containing USB\n" -" ^USB => find all CONFIG_ symbols starting with USB\n" -" USB$ => find all CONFIG_ symbols ending with USB\n" +"Examples: USB => find all symbols containing USB\n" +" ^USB => find all symbols starting with USB\n" +" USB$ => find all symbols ending with USB\n" "\n");static int indent;
scripts/kconfig/nconf.c +6 -6
@@ -217,8 +217,8 @@ save_config_help[] = N_( "leave this blank.\n"), search_help[] = N_("\n" -"Search for CONFIG_ symbols and display their relations.\n" -"Regular expressions are allowed.\n" +"Search for symbols and display their relations. Regular expressions\n" +"are allowed.\n" "Example: search for \"^FOO\"\n" "Result:\n" "-----------------------------------------------------------------\n"
@@ -234,7 +234,7 @@ search_help[] = N_("Selected by: BAR\n" "-----------------------------------------------------------------\n" "o The line 'Prompt:' shows the text used in the menu structure for\n" -" this CONFIG_ symbol\n" +" this symbol\n" "o The 'Defined at' line tell at what file / line number the symbol\n" " is defined\n" "o The 'Depends on:' line tell what symbols needs to be defined for\n"
@@ -250,9 +250,9 @@ search_help[] = N_("Only relevant lines are shown.\n" "\n\n" "Search examples:\n" -"Examples: USB = > find all CONFIG_ symbols containing USB\n" -" ^USB => find all CONFIG_ symbols starting with USB\n" -" USB$ => find all CONFIG_ symbols ending with USB\n" +"Examples: USB = > find all symbols containing USB\n" +" ^USB => find all symbols starting with USB\n" +" USB$ => find all symbols ending with USB\n" "\n");struct mitem {
Signature · 1 line
1.7.2.30.gc37d7.dirty
PATCH 3/15 kconfig: allow build-time definition of the internal config prefix
In reply to Arnaud Lacombe--- scripts/kconfig/conf.c | 2 +- scripts/kconfig/confdata.c | 48 ++++++++++++++++++++++++------------------- scripts/kconfig/lkc.h | 3 ++ scripts/kconfig/mconf.c | 10 ++++---- scripts/kconfig/menu.c | 2 +- scripts/kconfig/nconf.c | 12 +++++----- 6 files changed, 43 insertions(+), 34 deletions(-)
scripts/kconfig/conf.c +1 -1
@@ -425,7 +425,7 @@ static void check_conf(struct menu *menu) (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) {if (input_mode == listnewconfig) {if (sym->name && !sym_is_choice_value (sym)) { -printf ("CONFIG_%s\n" , sym->name); +printf ("%s%s\n" ,CONFIG_ , sym->name); } }else if (input_mode != oldnoconfig) {if (!conf_cnt++)
scripts/kconfig/confdata.c +27 -21
125 lines not on this page · raw message
scripts/kconfig/lkc.h +3 -0
@@ -37,6 +37,9 @@ extern "C" {#define _ (text) gettext(text)#define N_ (text) (text) +#ifndef CONFIG_ +#define CONFIG_ "CONFIG_" +#endif #define TF_COMMAND 0x0001#define TF_PARAM 0x0002
scripts/kconfig/mconf.c +5 -5
@@ -316,8 +316,8 @@ static void search_conf(void) again:dialog_clear (); dres =dialog_inputbox (_ ("Search Configuration Parameter" ), -_ ("Enter CONFIG_ (sub)string to search for " -"(with or without \"CONFIG\")" ), +_ ("Enter " CONFIG_ " (sub)string to search for " +"(with or without \"" CONFIG_ "\")" ),10 ,75 ,"" );switch (dres) {case 0 :
@@ -329,10 +329,10 @@ again:return ; } -/* strip CONFIG_ if necessary */ +/* strip the prefix if necessary */ dialog_input = dialog_input_result; -if (strncasecmp (dialog_input_result,"CONFIG_" ,7 ) ==0 ) - dialog_input +=7 ; +if (strncasecmp (dialog_input_result,CONFIG_ ,strlen (CONFIG_ )) ==0 ) + dialog_input +=strlen (CONFIG_ ); sym_arr =sym_re_search (dialog_input); res =get_relations_str (sym_arr);
scripts/kconfig/menu.c +1 -1
@@ -566,7 +566,7 @@ void menu_get_ext_help(struct menu *menu, struct gstr *help)if (menu_has_help (menu)) {if (sym->name) { -str_printf (help,"CONFIG_%s:\n\n" , sym->name); +str_printf (help,"%s%s:\n\n" ,CONFIG_ , sym->name);str_append (help,_ (menu_get_help (menu)));str_append (help,"\n" ); }
scripts/kconfig/nconf.c +6 -6
@@ -744,8 +744,8 @@ static void search_conf(void) again: dres =dialog_inputbox (main_window,_ ("Search Configuration Parameter" ), -_ ("Enter CONFIG_ (sub)string to search for " -"(with or without \"CONFIG\")" ), +_ ("Enter " CONFIG_ " (sub)string to search for " +"(with or without \"" CONFIG_ "\")" ),"" , dialog_input_result,99 );switch (dres) {case 0 :
@@ -758,10 +758,10 @@ again:return ; } -/* strip CONFIG_ if necessary */ +/* strip the prefix if necessary */ dialog_input = dialog_input_result; -if (strncasecmp (dialog_input_result,"CONFIG_" ,7 ) ==0 ) - dialog_input +=7 ; +if (strncasecmp (dialog_input_result,CONFIG_ ,strlen (CONFIG_ )) ==0 ) + dialog_input +=strlen (CONFIG_ ); sym_arr =sym_re_search (dialog_input); res =get_relations_str (sym_arr);
@@ -1261,7 +1261,7 @@ static void show_help(struct menu *menu)if (menu && menu->sym &&menu_has_help (menu)) {if (menu->sym->name) { -str_printf (&help,"CONFIG_%s:\n\n" , menu->sym->name); +str_printf (&help,"%s%s:\n\n" ,CONFIG_ , menu->sym->name);str_append (&help,_ (menu_get_help (menu)));str_append (&help,"\n" );get_symbol_str (&help, menu->sym);
Signature · 1 line
1.7.2.30.gc37d7.dirty
PATCH 4/15 kconfig: rephrase help texts/comments not to include the package name
In reply to Arnaud Lacombe--- scripts/kconfig/conf.c | 11 +++++------ scripts/kconfig/gconf.c | 3 +-- scripts/kconfig/mconf.c | 38 ++++++++++++++++++-------------------- scripts/kconfig/nconf.c | 43 +++++++++++++++++++------------------------ scripts/kconfig/qconf.cc | 2 +- 5 files changed, 44 insertions(+), 53 deletions(-)
scripts/kconfig/conf.c +5 -6
@@ -508,8 +508,7 @@ int main(int ac, char **av) name =conf_get_configname ();if (stat (name, &tmpstat)) { fprintf(stderr, _("***\n" - "*** You have not yet configured your kernel!\n" - "*** (missing kernel config file \"%s\")\n" + "*** Configuration file \"%s\" not found!\n" "***\n" "*** Please run some configurator (e.g. \"make oldconfig\" or\n" "*** \"make menuconfig\" or \"make xconfig\").\n"
@@ -571,7 +570,7 @@ int main(int ac, char **av) name =getenv ("KCONFIG_NOSILENTUPDATE" );if (name && *name) {fprintf (stderr, -_ ("\n*** Kernel configuration requires explicit update.\n\n" )); +_ ("\n*** The configuration requires explicit update.\n\n" ));return 1 ; } }
@@ -623,11 +622,11 @@ int main(int ac, char **av)* All other commands are only used to generate a config. */ if (conf_get_changed () &&conf_write (NULL )) { -fprintf (stderr,_ ("\n*** Error during writing of the kernel configuration.\n\n" )); +fprintf (stderr,_ ("\n*** Error during writing of the configuration.\n\n" ));exit (1 ); }if (conf_write_autoconf ()) { -fprintf (stderr,_ ("\n*** Error during update of the kernel configuration.\n\n" )); +fprintf (stderr,_ ("\n*** Error during update of the configuration.\n\n" ));return 1 ; } }else if (input_mode == savedefconfig) {
@@ -638,7 +637,7 @@ int main(int ac, char **av) } }else if (input_mode != listnewconfig) {if (conf_write (NULL )) { -fprintf (stderr,_ ("\n*** Error during writing of the kernel configuration.\n\n" )); +fprintf (stderr,_ ("\n*** Error during writing of the configuration.\n\n" ));exit (1 ); } }
scripts/kconfig/gconf.c +1 -2
@@ -671,8 +671,7 @@ void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data) {GtkWidget *dialog;const gchar *intro_text =_ ( -"Welcome to gkc, the GTK+ graphical kernel configuration tool\n" -"for Linux.\n" +"Welcome to gkc, the GTK+ graphical configuration tool\n" "For each option, a blank box indicates the feature is disabled, a\n" "check indicates it is enabled, and a dot indicates that it is to\n" "be compiled as a module. Clicking on the box will cycle through the three states.\n"
scripts/kconfig/mconf.c +18 -20
@@ -25,11 +25,9 @@static const char mconf_readme[] =N_ ("Overview\n" "--------\n" -"Some kernel features may be built directly into the kernel.\n" -"Some may be made into loadable runtime modules. Some features\n" -"may be completely removed altogether. There are also certain\n" -"kernel parameters which are not really features, but must be\n" -"entered in as decimal or hexadecimal numbers or possibly text.\n" +"This interface let you select features and parameters for the build\n" +"Features can either be built-in, modularized, or ignored. Parameters\n" +"must be entered in as decimal or hexadecimal numbers or text.\n" "\n" "Menu items beginning with following braces represent features that\n" " [ ] can be built in or removed\n"
@@ -117,7 +115,7 @@ static const char mconf_readme[] = N_("-----------------------------\n" "Menuconfig supports the use of alternate configuration files for\n" "those who, for various reasons, find it necessary to switch\n" -"between different kernel configurations.\n" +"between different configurations.\n" "\n" "At the end of the main menu you will find two options. One is\n" "for saving the current configuration to a file of your choosing.\n"
@@ -150,9 +148,9 @@ static const char mconf_readme[] = N_("\n" "Optional personality available\n" "------------------------------\n" -"If you prefer to have all of the kernel options listed in a single\n" -"menu, rather than the default multimenu hierarchy, run the menuconfig\n" -"with MENUCONFIG_MODE environment variable set to single_menu. Example:\n" +"If you prefer to have all of the options listed in a single menu, rather\n" +"than the default multimenu hierarchy, run the menuconfig with\n" +"MENUCONFIG_MODE environment variable set to single_menu. Example:\n" "\n" "make MENUCONFIG_MODE=single_menu menuconfig\n" "\n"
@@ -207,12 +205,12 @@ load_config_text[] = N_( "last retrieved. Leave blank to abort."), load_config_help[] = N_("\n" -"For various reasons, one may wish to keep several different kernel\n" +"For various reasons, one may wish to keep several different\n" "configurations available on a single machine.\n" "\n" "If you have saved a previous configuration in a file other than the\n" -"kernel's default, entering the name of the file here will allow you\n" -"to modify that configuration.\n" +"default one, entering its name here will allow you to modify that\n" +"configuration.\n" "\n" "If you are uncertain, then you have probably never used alternate\n" "configuration files. You should therefore leave this blank to abort.\n"),
@@ -221,8 +219,8 @@ save_config_text[] = N_( "as an alternate. Leave blank to abort."), save_config_help[] = N_("\n" -"For various reasons, one may wish to keep different kernel\n" -"configurations available on a single machine.\n" +"For various reasons, one may wish to keep different configurations\n" +"available on a single machine.\n" "\n" "Entering a file name here will allow you to later retrieve, modify\n" "and use the current configuration as an alternate to whatever\n"
@@ -834,7 +832,7 @@ int main(int ac, char **av)if (conf_get_changed ()) res =dialog_yesno (NULL ,_ ("Do you wish to save your " -"new kernel configuration?\n" +"new configuration?\n" "<ESC><ESC> to continue." ),6 ,60 );else
@@ -846,20 +844,20 @@ int main(int ac, char **av)case 0 :if (conf_write (filename)) {fprintf (stderr,_ ("\n\n" -"Error during writing of the kernel configuration.\n" -"Your kernel configuration changes were NOT saved." +"Error while writing of the configuration.\n" +"Your configuration changes were NOT saved." "\n\n" ));return 1 ; }case -1 :printf (_ ("\n\n" -"*** End of Linux kernel configuration.\n" -"*** Execute 'make' to build the kernel or try 'make help'." +"*** End of the configuration.\n" +"*** Execute 'make' to start the build or try 'make help'." "\n\n" ));break ;default :fprintf (stderr,_ ("\n\n" -"Your kernel configuration changes were NOT saved." +"Your configuration changes were NOT saved." "\n\n" )); }
scripts/kconfig/nconf.c +19 -24
106 lines not on this page · raw message
scripts/kconfig/qconf.cc +1 -1
@@ -1655,7 +1655,7 @@ void ConfigMainWindow::closeEvent(QCloseEvent* e) void ConfigMainWindow::showIntro(void) { - static const QString str = _("Welcome to the qconf graphical kernel configuration tool for Linux.\n\n" + static const QString str = _("Welcome to the qconf graphical configuration tool.\n\n" "For each option, a blank box indicates the feature is disabled, a check\n" "indicates it is enabled, and a dot indicates that it is to be compiled\n" "as a module. Clicking on the box will cycle through the three states.\n\n"
Signature · 1 line
1.7.2.30.gc37d7.dirty
Re: [PATCH 04/15] kconfig: rephrase help texts/comments not to include the package name
Quoted 14 lines · On Sat, 11 Sep 2010 11:51:11 -0400 Arnaud Lacombe wrote:
Signed-off-by Arnaud Lacombe <[email protected]>--- scripts/kconfig/conf.c | 11 +++++------ scripts/kconfig/gconf.c | 3 +-- scripts/kconfig/mconf.c | 38 ++++++++++++++++++-------------------- scripts/kconfig/nconf.c | 43 +++++++++++++++++++------------------------ scripts/kconfig/qconf.cc | 2 +- 5 files changed, 44 insertions(+), 53 deletions(-)scripts/kconfig/conf.c +0
-0
scripts/kconfig/conf.c int main(int ac, char **av) · line 514
Quoted 9 lines
scripts/kconfig/conf.c +1
-2@@ -508,8 +508,7 @@ int main(int ac, char **av) name =conf_get_configname ();if (stat (name, &tmpstat)) { fprintf(stderr, _("***\n" - "*** You have not yet configured your kernel!\n" - "*** (missing kernel config file \"%s\")\n" + "*** Configuration file \"%s\" not found!\n" "***\n" "*** Please run some configurator (e.g. \"make oldconfig\" or\n" "*** \"make menuconfig\" or \"make xconfig\").\n"
but these *config program names are OK?
scripts/kconfig/gconf.c void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data) · line 674
Quoted 11 lines
scripts/kconfig/gconf.c +1
-2@@ -671,8 +671,7 @@ void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data) {GtkWidget *dialog;const gchar *intro_text =_ ( -"Welcome to gkc, the GTK+ graphical kernel configuration tool\n" - "for Linux.\n" + "Welcome to gkc, the GTK+ graphical configuration tool\n"
Should be "gconfig". It's never been called "gkc" AFAIK.
Quoted 8 lines
scripts/kconfig/gconf.c +0
-0"For each option, a blank box indicates the feature is disabled, a\n" "check indicates it is enabled, and a dot indicates that it is to\n" "be compiled as a module. Clicking on the box will cycle through the three states.\n" scripts/kconfig/mconf.c +0
-0
scripts/kconfig/mconf.c line 28
Quoted 9 lines
scripts/kconfig/mconf.c +1
-5@@ -25,11 +25,9 @@static const char mconf_readme[] =N_ ("Overview\n" "--------\n" -"Some kernel features may be built directly into the kernel.\n" -"Some may be made into loadable runtime modules. Some features\n" -"may be completely removed altogether. There are also certain\n" -"kernel parameters which are not really features, but must be\n" -"entered in as decimal or hexadecimal numbers or possibly text.\n" +"This interface let you select features and parameters for the build\n"
end above sentence with period.
Quoted 10 lines
scripts/kconfig/mconf.c +2
-0+"Features can either be built-in, modularized, or ignored. Parameters\n" +"must be entered in as decimal or hexadecimal numbers or text.\n" "\n" "Menu items beginning with following braces represent features that\n" " [ ] can be built in or removed\n" scripts/kconfig/nconf.c +0
-0
scripts/kconfig/nconf.c line 18
Quoted 9 lines
scripts/kconfig/nconf.c +1
-5@@ -15,11 +15,9 @@static const char nconf_readme[] =N_ ("Overview\n" "--------\n" -"Some kernel features may be built directly into the kernel.\n" -"Some may be made into loadable runtime modules. Some features\n" -"may be completely removed altogether. There are also certain\n" -"kernel parameters which are not really features, but must be\n" -"entered in as decimal or hexadecimal numbers or possibly text.\n" +"This interface let you select features and parameters for the build\n"
end sentence above with a period.
Quoted 6 lines
scripts/kconfig/nconf.c +2
-0+"Features can either be built-in, modularized, or ignored. Parameters\n" +"must be entered in as decimal or hexadecimal numbers or text.\n" "\n" "Menu items beginning with following braces represent features that\n" " [ ] can be built in or removed\n"
scripts/kconfig/nconf.c static const char nconf_readme[] = N_( · line 130
Quoted 8 lines
scripts/kconfig/nconf.c +2
-3@@ -128,9 +126,9 @@ static const char nconf_readme[] = N_("\n" "Optional personality available\n" "------------------------------\n" -"If you prefer to have all of the kernel options listed in a single\n" -"menu, rather than the default multimenu hierarchy, run the nconfig\n" -"with NCONFIG_MODE environment variable set to single_menu. Example:\n" +"If you prefer to have all of the options listed in a single menu, rather\n" +"than the default multimenu hierarchy, run the menuconfig with\n"
s/menuconfig/nconfig/
Quoted 9 lines
scripts/kconfig/nconf.c +1
-0+"NCONFIG_MODE environment variable set to single_menu. Example:\n" "\n" "make NCONFIG_MODE=single_menu nconfig\n" "\n" scripts/kconfig/qconf.cc +0
-0
scripts/kconfig/qconf.cc void ConfigMainWindow::closeEvent(QCloseEvent* e) · line 1658
Quoted 5 lines
scripts/kconfig/qconf.cc +1
-1@@ -1655,7 +1655,7 @@ void ConfigMainWindow::closeEvent(QCloseEvent* e) void ConfigMainWindow::showIntro(void) { - static const QString str = _("Welcome to the qconf graphical kernel configuration tool for Linux.\n\n" + static const QString str = _("Welcome to the qconf graphical configuration tool.\n\n"
s/qconf/xconfig/
scripts/kconfig/qconf.cc void ConfigMainWindow::closeEvent(QCloseEvent* e) · line 1661
Quoted 4 lines
scripts/kconfig/qconf.cc +0
-0"For each option, a blank box indicates the feature is disabled, a check\n" "indicates it is enabled, and a dot indicates that it is to be compiled\n" "as a module. Clicking on the box will cycle through the three states.\n\n"
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
Re: [PATCH 04/15] kconfig: rephrase help texts/comments not to include the package name
Hi,
Quoted 10 lines · Randy Dunlap
Quoted 8 lines · On Sat, 11 Sep 2010 11:51:11 -0400 Arnaud Lacombe wrote:
if (
stat(name, &tmpstat)) {
fprintf(stderr, _("***\n"
- "*** You have not yet configured your kernel!\n"
- "*** (missing kernel config file \"%s\")\n"
+ "*** Configuration file \"%s\" not found!\n" "***\n"
"*** Please run some configurator (e.g. \"make oldconfig\" or\n" "*** \"make menuconfig\" or \"make xconfig\").\n"
Quoted 2 lines
but these *config program names are OK?
I'm not aware of all use cases of conf'. That said, this case is only relevant if the expected configuration file does not exist which can be overridden trivially before running conf'.
Beside that, typos have been addressed in the updated version of the branch (I'll send a diff-to-previous shortly) as well as a couple of other nits I noticed today (mostly compiler warnings). I will not address the "gkc"/"qconf" issue as they're beyond the scope of this changeset. I also amended the commit log adding a "Reviewed-by" you.
Thanks for the comments!
- Arnaud
Re: [PATCH 04/15] kconfig: rephrase help texts/comments not to include the package name
In reply to Randy DunlapHi,
I'm revisiting this. Would that make sense to rename "gkc" and "qconf" to respectively "gconfig" and "xconfig" ? There is copyright from their respective author associated with each one, so that would have to be updated also.
Thanks,
- Arnaud
Quoted 15 lines · Randy Dunlap
Quoted 11 lines · On Sat, 11 Sep 2010 11:51:11 -0400 Arnaud Lacombe wrote:
scripts/kconfig/gconf.c +0
-0@@ -671,8 +671,7 @@ void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data) { GtkWidget *dialog;const gchar
*intro_text= _(
- "Welcome to gkc, the GTK+ graphical kernel configuration tool\n"
- "for Linux.\n"
+ "Welcome to gkc, the GTK+ graphical configuration tool\n"Should be "gconfig". It's never been called "gkc" AFAIK.
[...]
Quoted 23 lines
scripts/kconfig/qconf.cc void ConfigMainWindow::closeEvent(QCloseEvent* e) · line 1658
Quoted 10 lines
scripts/kconfig/qconf.cc +1
-1@@ -1655,7 +1655,7 @@ void ConfigMainWindow::closeEvent(QCloseEvent* e) void ConfigMainWindow::showIntro(void) { - static const QString str = _("Welcome to the qconf graphical kernel configuration tool for Linux.\n\n" + static const QString str = _("Welcome to the qconf graphical configuration tool.\n\n"s/qconf/xconfig/
Quoted 4 lines
"For each option, a blank box indicates the feature is disabled, a check\n" "indicates it is enabled, and a dot indicates that it is to be compiled\n" "as a module. Clicking on the box will cycle through the three states.\n\n" --
---
~Randy
*** Remember to useDocumentation/SubmitChecklistwhen testing your code ***
Re: [PATCH 04/15] kconfig: rephrase help texts/comments not to include the package name
Quoted 6 lines · On Wed, 20 Oct 2010 22:40:30 -0400 Arnaud Lacombe wrote:
Hi,
I'm revisiting this. Would that make sense to rename "gkc" and "qconf" to respectively "gconfig" and "xconfig" ? There is copyright from their respective author associated with each one, so that would have to be updated also.
I would say yes. We always refer to gconfig, xconfig, nconfig, menuconfig... and not to gkc nor qconf.
Quoted 39 lines
Thanks,
- ArnaudQuoted 15 lines · Randy Dunlap
Quoted 11 lines · On Sat, 11 Sep 2010 11:51:11 -0400 Arnaud Lacombe wrote:
scripts/kconfig/gconf.c +0
-0@@ -671,8 +671,7 @@ void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data) { GtkWidget *dialog;const gchar
*intro_text= _(
- "Welcome to gkc, the GTK+ graphical kernel configuration tool\n"
- "for Linux.\n"
+ "Welcome to gkc, the GTK+ graphical configuration tool\n"Should be "gconfig". It's never been called "gkc" AFAIK.
[...]
Quoted 19 lines
scripts/kconfig/qconf.cc void ConfigMainWindow::closeEvent(QCloseEvent* e) · line 1658
Quoted 10 lines
scripts/kconfig/qconf.cc +1
-1@@ -1655,7 +1655,7 @@ void ConfigMainWindow::closeEvent(QCloseEvent* e) void ConfigMainWindow::showIntro(void) { - static const QString str = _("Welcome to the qconf graphical kernel configuration tool for Linux.\n\n" + static const QString str = _("Welcome to the qconf graphical configuration tool.\n\n"s/qconf/xconfig/
Quoted 4 lines
"For each option, a blank box indicates the feature is disabled, a check\n" "indicates it is enabled, and a dot indicates that it is to be compiled\n" "as a module. Clicking on the box will cycle through the three states.\n\n" --
Quoted 8 lines
Quoted 4 lines
---
~Randy
*** Remember to useDocumentation/SubmitChecklistwhen testing your code ***--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
Re: [PATCH 04/15] kconfig: rephrase help texts/comments not to include the package name
In reply to Arnaud LacombeDne 11.9.2010 17:51, Arnaud Lacombe napsal(a):
Quoted 4 lines
scripts/kconfig/nconf.c +0
-0
[...]
scripts/kconfig/nconf.c static int do_exit(void) · line 709
Quoted 1 line
scripts/kconfig/nconf.c +1
-0+ "End of the configuration.\n":
You have a stray colon here ^
scripts/kconfig/nconf.c static int do_exit(void) · line 711
Quoted 2 lines
scripts/kconfig/nconf.c +1
-0+"Execute 'make' to start the build or try" " 'make help'."), filename);
Michal
PATCH 5/15 kconfig: allow PACKAGE to be defined on the compiler's command-line
In reply to Arnaud Lacombe--- scripts/kconfig/lkc.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
scripts/kconfig/lkc.h +3 -0
@@ -31,7 +31,10 @@ extern "C" {#define SRCTREE "srctree" +#ifndef PACKAGE #define PACKAGE "linux" +#endif +#define LOCALEDIR "/usr/share/locale"#define _ (text) gettext(text)
Signature · 1 line
1.7.2.30.gc37d7.dirty
PATCH 6/15 kconfig: implement the `mainmenu' directive
In reply to Arnaud LacombeIf specified, the directive must be placed at the top of the Kconfig file.
We need to change the grammar to make the mainmenu directive set the rootmenu' prompt. This reflect how menu_add_prompt() works internally, ie. set the prompt of the current_entry', pointing originally to `rootmenu'.
--- Documentation/kbuild/kconfig-language.txt | 3 ++- scripts/kconfig/zconf.y | 14 +++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-)
Documentation/kbuild/kconfig-language.txt +2 -1
@@ -322,7 +322,8 @@ mainmenu: "mainmenu" <prompt> This sets the config program's title bar if the config program chooses -to use it. +to use it. It should be placed at the top of the configuration, before any +other statement. Kconfig hints
scripts/kconfig/zconf.y +11 -3
@@ -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
Signature · 1 line
1.7.2.30.gc37d7.dirty
Re: [PATCH 06/15] kconfig: implement the `mainmenu' directive
Quoted 61 lines · Arnaud Lacombe
If specified, the directive must be placed at the top of the
Kconfigfile.We need to change the grammar to make the mainmenu directive set the
rootmenu' prompt. This reflect how menu_add_prompt() works internally, ie. set the prompt of thecurrent_entry', pointing originally to `rootmenu'.Signed-off-by Arnaud Lacombe <[email protected]>--- Documentation/kbuild/kconfig-language.txt | 3 ++- scripts/kconfig/zconf.y | 14 +++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-)Documentation/kbuild/kconfig-language.txt +2
-1@@ -322,7 +322,8 @@ mainmenu: "mainmenu" <prompt> This sets the config program's title bar if the config program chooses -to use it. +to use it. It should be placed at the top of the configuration, before any +other statement. Kconfig hintsscripts/kconfig/zconf.y +4
-3@@ -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 ;
scripts/kconfig/zconf.y if_block: · line 355
Quoted 10 lines
scripts/kconfig/zconf.y +7
-0+/* mainmenu entry */ + +mainmenu_stmt: T_MAINMENU prompt nl +{ + menu_add_prompt(P_MENU, $2, NULL); +}; + /* menu entry */ menu: T_MENU prompt T_EOL
With the above the mainmenu is mandatory.
So there is no longer a need to explicit give it a promt as is done in conf_parse:
modules_sym->flags |= SYMBOL_AUTO;
rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);And if we delete this (now not needed) assignment, we no longer requre the patch that silence warning about redefinition of rootmeny prompt.
Sam
Re: [PATCH 06/15] kconfig: implement the `mainmenu' directive
Hi,
Quoted 13 lines · Sam Ravnborg
scripts/kconfig/zconf.y static struct menu *current_menu, *current_entry; · line 109
Quoted 7 lines · Arnaud Lacombe
[...]
%%scripts/kconfig/zconf.y +3
-1-input: stmt_list; +input: nl start | start; + +start: mainmenu_stmt stmt_list | stmt_list;With the above the mainmenu is mandatory.
So there is no longer a need to explicit give it a promt as is done inconf_parse:
Quoted 7 lines
modules_sym->flags |=
SYMBOL_AUTO;
rootmenu.prompt =menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);And if we delete this (now not needed) assignment, we no longer requre the patch that silence warning about redefinition of rootmeny prompt.
No, it is not mandatory. My first implementation made it mandatory, but I loosen the requirement after you asked me that it would be nice not to have it mandatory for simple Kconfig file. Making it that way also save some trouble on UML, but I'll come back on that later on.
- Arnaud
PATCH 7/15 kconfig: add a symbol string expansion helper
In reply to Arnaud Lacombe--- scripts/kconfig/lkc_proto.h | 1 + scripts/kconfig/symbol.c | 49 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 0 deletions(-)
scripts/kconfig/lkc_proto.h +1 -0
@@ -28,6 +28,7 @@ P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]); P(sym_lookup,struct symbol *,(const char *name, int flags)); P(sym_find,struct symbol *,(const char *name)); +P(sym_expand_string_value,const char *,(const char *in)); P(sym_re_search,struct symbol **,(const char *pattern)); P(sym_type_name,const char *,(enum symbol_type type)); P(sym_calc_value,void,(struct symbol *sym));
scripts/kconfig/symbol.c +49 -0
55 lines not on this page · raw message
Signature · 1 line
1.7.2.30.gc37d7.dirty
PATCH 8/15 kconfig: expand by default the rootmenu's prompt
In reply to Arnaud Lacombe--- scripts/kconfig/zconf.y | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
scripts/kconfig/zconf.y +4 -0
@@ -502,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 = strdup(_(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))
Signature · 1 line
1.7.2.30.gc37d7.dirty
Re: [PATCH 08/15] kconfig: expand by default the rootmenu's prompt
Hi,
Quoted 10 lines · Arnaud Lacombe
Signed-off-by Arnaud Lacombe <[email protected]>---
scripts/kconfig/zconf.y | 4 ++++1 files changed, 4 insertions(+), 0 deletions(-)scripts/kconfig/zconf.y +0
-0
scripts/kconfig/zconf.y void conf_parse(const char *name) · line 508
Quoted 7 lines
scripts/kconfig/zconf.y +4
-0@@ -502,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 = strdup(_(rootmenu.prompt->text)); + rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text); +
actually, this strdup(3) is useless as it will be performed by sym_expand_string_value().
- Arnaud
PATCH 9/15 kconfig: replace KERNELVERSION usage by the mainmenu's prompt
In reply to Arnaud Lacombe--- scripts/kconfig/confdata.c | 12 ++++-------- scripts/kconfig/gconf.c | 5 +---- scripts/kconfig/mconf.c | 6 +----- scripts/kconfig/nconf.c | 6 +----- scripts/kconfig/qconf.cc | 4 ++-- 5 files changed, 9 insertions(+), 24 deletions(-)
scripts/kconfig/confdata.c +4 -8
@@ -574,8 +574,6 @@ int conf_write(const char *name)if (!out)return 1 ; - sym =sym_lookup ("KERNELVERSION" ,0 ); -sym_calc_value (sym);time (&now); env =getenv ("KCONFIG_NOTIMESTAMP" );if (env && *env)
@@ -583,10 +581,10 @@ int conf_write(const char *name)fprintf (out,_ ("#\n" "# Automatically generated make config: don't edit\n" -"# Linux kernel version: %s\n" +"# %s\n" "%s%s" "#\n" ), -sym_get_string_value (sym), + rootmenu.prompt->text, use_timestamp ?"# " :"" , use_timestamp ?ctime (&now) :"" );
@@ -797,15 +795,13 @@ int conf_write_autoconf(void)return 1 ; } - sym =sym_lookup ("KERNELVERSION" ,0 ); -sym_calc_value (sym);time (&now);fprintf (out,"#\n" "# Automatically generated make config: don't edit\n" -"# Linux kernel version: %s\n" +"# %s\n" "# %s" "#\n" , -sym_get_string_value (sym),ctime (&now)); + rootmenu.prompt->text,ctime (&now));fprintf (tristate,"#\n" "# Automatically generated - do not edit\n" "\n" );
scripts/kconfig/gconf.c +1 -4
@@ -133,7 +133,6 @@ void init_main_window(const gchar * glade_file)GladeXML *xml;GtkWidget *widget;GtkTextBuffer *txtbuf; -char title[256 ];GtkStyle *style; xml =glade_xml_new (glade_file,"window1" ,NULL );
@@ -210,9 +209,7 @@ void init_main_window(const gchar * glade_file)/*"style", PANGO_STYLE_OBLIQUE, */ NULL); -sprintf (title,_ ("Linux Kernel v%s Configuration" ), -getenv ("KERNELVERSION" )); -gtk_window_set_title (GTK_WINDOW (main_wnd), title); +gtk_window_set_title (GTK_WINDOW (main_wnd), rootmenu.prompt->text);gtk_widget_show (main_wnd); }
scripts/kconfig/mconf.c +1 -5
@@ -288,13 +288,9 @@ static void set_config_filename(const char *config_filename) {static char menu_backtitle[PATH_MAX +128 ];int size; -struct symbol *sym; - sym =sym_lookup ("KERNELVERSION" ,0 ); -sym_calc_value (sym); size =snprintf (menu_backtitle,sizeof (menu_backtitle), -_ ("%s - Linux Kernel v%s Configuration" ), - config_filename,sym_get_string_value (sym)); +"%s - %s" , config_filename, rootmenu.prompt->text);if (size >=sizeof (menu_backtitle)) menu_backtitle[sizeof (menu_backtitle)-1 ] ='\0' ;set_dialog_backtitle (menu_backtitle);
scripts/kconfig/nconf.c +1 -5
@@ -633,13 +633,9 @@ static char menu_backtitle[PATH_MAX+128];static const char *set_config_filename (const char *config_filename) {int size; -struct symbol *sym; - sym =sym_lookup ("KERNELVERSION" ,0 ); -sym_calc_value (sym); size =snprintf (menu_backtitle,sizeof (menu_backtitle), -_ ("%s - Linux Kernel v%s Configuration" ), - config_filename,sym_get_string_value (sym)); +"%s - %s" , config_filename, rootmenu.prompt->text);if (size >=sizeof (menu_backtitle)) menu_backtitle[sizeof (menu_backtitle)-1 ] ='\0' ;
scripts/kconfig/qconf.cc +2 -2
@@ -1274,8 +1274,8 @@ ConfigMainWindow::ConfigMainWindow(void) char title[256]; QDesktopWidget *d = configApp->desktop(); - snprintf(title, sizeof(title), _("Linux Kernel v%s Configuration%s"), - getenv("KERNELVERSION"), + snprintf(title, sizeof(title), "%s%s"), + rootmenu.prompt->text, #if QT_VERSION < 0x040000 " (Qt3)" #else
Signature · 1 line
1.7.2.30.gc37d7.dirty
Re: [PATCH 09/15] kconfig: replace KERNELVERSION usage by the mainmenu's prompt
Hi,
Quoted 10 lines · Arnaud Lacombe
scripts/kconfig/confdata.c +0
-2@@ -797,15 +795,13 @@ int conf_write_autoconf(void) return 1; } - sym = sym_lookup("KERNELVERSION", 0); - sym_calc_value(sym); time(&now);fprintf(out, "#\n"
"# Automatically generated make config: don't edit\n"
- "# Linux kernel version: %s\n"
Quoted 8 lines
+ "# %s\n"
"# %s"
"#\n",
- sym_get_string_value(sym),ctime(&now));
+ rootmenu.prompt->text,ctime(&now)); fprintf(tristate, "#\n"
"# Automatically generated - do not edit\n" "\n");
d'oh! I missed one occurence of "Linux kernel version:..." right below that one :(
Fixed in the `kbuild-generic-v6' branch of the github repo, as is the extra strdup().
- Arnaud
Re: [PATCH 09/15] kconfig: replace KERNELVERSION usage by the mainmenu's prompt
In reply to Arnaud LacombeDne 11.9.2010 17:51, Arnaud Lacombe napsal(a):
scripts/kconfig/qconf.cc ConfigMainWindow::ConfigMainWindow(void) · line 1277
Quoted 4 lines
scripts/kconfig/qconf.cc +1
-2QDesktopWidget *d = configApp->desktop(); - snprintf(title, sizeof(title), _("Linux Kernel v%s Configuration%s"), - getenv("KERNELVERSION"), + snprintf(title, sizeof(title), "%s%s"),
^
The closing paren should not be there.
Michal
Re: [PATCH 09/15] kconfig: replace KERNELVERSION usage by the mainmenu's prompt
In reply to Arnaud LacombeHi,
Quoted 22 lines · Arnaud Lacombe
Signed-off-by Arnaud Lacombe <[email protected]>---
scripts/kconfig/confdata.c | 12 ++++--------scripts/kconfig/gconf.c | 5 +---- scripts/kconfig/mconf.c | 6 +----- scripts/kconfig/nconf.c | 6 +----- scripts/kconfig/qconf.cc | 4 ++-- 5 files changed, 9 insertions(+), 24 deletions(-)scripts/kconfig/gconf.c +0
-1@@ -133,7 +133,6 @@ void init_main_window(const gchar * glade_file) GladeXML *xml; GtkWidget *widget; GtkTextBuffer *txtbuf; - char title[256]; GtkStyle *style; xml = glade_xml_new(glade_file, "window1", NULL);
scripts/kconfig/gconf.c void init_main_window(const gchar * glade_file) · line 215
Quoted 10 lines
scripts/kconfig/gconf.c +1
-3@@ -210,9 +209,7 @@ void init_main_window(const gchar * glade_file) /*"style", PANGO_STYLE_OBLIQUE, */ NULL); - sprintf(title, _("Linux Kernel v%s Configuration"), - getenv("KERNELVERSION")); - gtk_window_set_title(GTK_WINDOW(main_wnd), title); + gtk_window_set_title(GTK_WINDOW(main_wnd), rootmenu.prompt->text); gtk_widget_show(main_wnd); }
This breaks `gconfig' because init_main_window() is being called before conf_parse(). Would it be ok to delay the window initialization after the parsing ? Completely untested as I don't have access to a $DISPLAY yet:
@@ -1527,12 +1535,6 @@ int main(int ac, char *av[])
else
glade_file = g_strconcat(g_get_current_dir(), "/",av[0], ".glade", NULL);
- /* Load the interface and connect signals */
- init_main_window(glade_file);
- init_tree_model();
- init_left_tree();
- init_right_tree();
-
/* Conf stuffs */
if (ac > 1 && av[1][0] == '-') {
switch (av[1][1]) {
@@ -1552,6 +1554,12 @@ int main(int ac, char *av[])
fixup_rootmenu(&rootmenu);
conf_read(NULL);+ /* Load the interface and connect signals */ + init_main_window(glade_file); + init_tree_model(); + init_left_tree(); + init_right_tree();
+
- Arnaud
PATCH 10/15 kconfig: don't emit warning upon rootmenu's prompt redefinition
In reply to Arnaud LacombeThis silences the warning printed upon prompt redefinition for the rootmenu. We will encounter this redefinition when a "mainmenu" statement is specified and override the default prompt.
--- scripts/kconfig/menu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
scripts/kconfig/menu.c +1 -1
@@ -139,7 +139,7 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *ewhile (isspace (*prompt)) prompt++; } -if (current_entry->prompt) +if (current_entry->prompt && current_entry != &rootmenu)prop_warn (prop,"prompt redefined" ); current_entry->prompt = prop; }
Signature · 1 line
1.7.2.30.gc37d7.dirty
PATCH 11/15 kconfig: constify file name
In reply to Arnaud Lacombe--- scripts/kconfig/expr.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
scripts/kconfig/expr.h +1 -1
@@ -18,7 +18,7 @@ extern "C" {struct file {struct file *next;struct file *parent; -char *name; +const char *name;int lineno;int flags; };
Signature · 1 line
1.7.2.30.gc37d7.dirty
PATCH 12/15 kconfig: use the file's name of sourced file
In reply to Arnaud Lacombe--- scripts/kconfig/zconf.l | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
scripts/kconfig/zconf.l +3 -2
@@ -304,9 +304,10 @@ void zconf_nextfile(const char *name) memset(buf, 0, sizeof(*buf)); current_buf->state = YY_CURRENT_BUFFER; - yyin = zconf_fopen(name); + yyin = zconf_fopen(file->name); if (!yyin) { - printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name); + printf("%s:%d: can't open file \"%s\"\n", + zconf_curname(), zconf_lineno(), file->name); exit(1); } yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
Signature · 1 line
1.7.2.30.gc37d7.dirty
PATCH 13/15 kconfig: expand file names
In reply to Arnaud LacombeThis will allow to use the following construct in source files:
config FOO
string
default "foo"
source "$FOO/Kconfig"
--- scripts/kconfig/util.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
scripts/kconfig/util.c +5 -2
@@ -12,15 +12,18 @@struct file *file_lookup (const char *name) {struct file *file; +const char *file_name =sym_expand_string_value (name);for (file = file_list; file; file = file->next) { -if (!strcmp (name, file->name)) +if (!strcmp (name, file->name)) { +free (file_name);return file; + } } file =malloc (sizeof (*file));memset (file,0 ,sizeof (*file)); - file->name =strdup (name); + file->name = file_name; file->next = file_list; file_list = file;return file;
Signature · 1 line
1.7.2.30.gc37d7.dirty
PATCH 14/15 kconfig: regen parser
In reply to Arnaud Lacombe--- scripts/kconfig/lex.zconf.c_shipped | 5 +- scripts/kconfig/zconf.tab.c_shipped | 547 ++++++++++++++++++----------------- 2 files changed, 286 insertions(+), 266 deletions(-)
scripts/kconfig/lex.zconf.c_shipped +3 -2
@@ -2373,9 +2373,10 @@ void zconf_nextfile(const char *name) memset(buf, 0, sizeof(*buf)); current_buf->state = YY_CURRENT_BUFFER; - zconfin = zconf_fopen(name); + zconfin = zconf_fopen(file->name); if (!zconfin) { - printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name); + printf("%s:%d: can't open file \"%s\"\n", + zconf_curname(), zconf_lineno(), file->name); exit(1); } zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE));
scripts/kconfig/zconf.tab.c_shipped +283 -264
933 lines not on this page · raw message
Signature · 1 line
1.7.2.30.gc37d7.dirty
Re: [PATCH 14/15] kconfig: regen parser
Dne 11.9.2010 17:51, Arnaud Lacombe napsal(a):
Quoted 5 lines
Signed-off-by Arnaud Lacombe <[email protected]>--- scripts/kconfig/lex.zconf.c_shipped | 5 +- scripts/kconfig/zconf.tab.c_shipped | 547 ++++++++++++++++++----------------- 2 files changed, 286 insertions(+), 266 deletions(-)
The grammar was changed in "[PATCH 06/15] kconfig: implement the `mainmenu' directive", so it would be easier to understand the history if the update was done right after that patch. The later changes do not change any of the flex/bison tables, so I would simply fold them into the respective patches.
Michal
PATCH 15/15 kbuild: migrate all arch to the kconfig mainmenu upgrade
In reply to Arnaud Lacombe--- Kconfig | 11 +++++++++++ arch/alpha/Kconfig | 4 ---- arch/arm/Kconfig | 7 ------- arch/avr32/Kconfig | 7 ------- arch/blackfin/Kconfig | 7 ------- arch/cris/Kconfig | 7 ------- arch/frv/Kconfig | 6 ------ arch/h8300/Kconfig | 7 ------- arch/ia64/Kconfig | 7 ------- arch/m32r/Kconfig | 7 ------- arch/m68k/Kconfig | 6 ------ arch/m68knommu/Kconfig | 7 ------- arch/microblaze/Kconfig | 5 ----- arch/mips/Kconfig | 2 -- arch/mn10300/Kconfig | 9 --------- arch/parisc/Kconfig | 7 ------- arch/powerpc/Kconfig | 6 ------ arch/s390/Kconfig | 7 ------- arch/score/Kconfig | 5 ----- arch/sh/Kconfig | 7 ------- arch/sparc/Kconfig | 6 ------ arch/tile/Kconfig | 2 -- arch/um/Kconfig.common | 2 -- arch/x86/Kconfig | 3 --- arch/xtensa/Kconfig | 5 ----- scripts/kconfig/Makefile | 2 +- 26 files changed, 12 insertions(+), 139 deletions(-) create mode 100644 Kconfig
Kconfig new file +11 -0
@@ -0,0 +1,11 @@ +# +# For a description of the syntax of this configuration file, +# see Documentation/kbuild/kconfig-language.txt. +# +mainmenu "Linux/$ARCH $KERNELVERSION Kernel Configuration" + +config SRCARCH + string + option env="SRCARCH" + +source "arch/$SRCARCH/Kconfig"
arch/alpha/Kconfig +0 -4
@@ -1,7 +1,3 @@ -# -# For a description of the syntax of this configuration file, -# see Documentation/kbuild/kconfig-language.txt. -# config ALPHA bool default y
arch/arm/Kconfig +0 -7
@@ -1,10 +1,3 @@ -# -# For a description of the syntax of this configuration file, -# see Documentation/kbuild/kconfig-language.txt. -# - -mainmenu "Linux Kernel Configuration" - config ARM bool default y
arch/avr32/Kconfig +0 -7
@@ -1,10 +1,3 @@ -# -# For a description of the syntax of this configuration file, -# see Documentation/kbuild/kconfig-language.txt. -# - -mainmenu "Linux Kernel Configuration" - config AVR32 def_bool y # With EMBEDDED=n, we get lots of stuff automatically selected
arch/blackfin/Kconfig +0 -7
@@ -1,10 +1,3 @@ -# -# For a description of the syntax of this configuration file, -# see Documentation/kbuild/kconfig-language.txt. -# - -mainmenu "Blackfin Kernel Configuration" - config SYMBOL_PREFIX string default "_"
arch/cris/Kconfig +0 -7
@@ -1,10 +1,3 @@ -# -# For a description of the syntax of this configuration file, -# see the Configure script. -# - -mainmenu "Linux/CRIS Kernel Configuration" - config MMU bool default y
arch/frv/Kconfig +0 -6
@@ -1,7 +1,3 @@ -# -# For a description of the syntax of this configuration file, -# see Documentation/kbuild/kconfig-language.txt. -# config FRV bool default y
@@ -60,8 +56,6 @@ config HZ int default 1000 -mainmenu "Fujitsu FR-V Kernel Configuration" - source "init/Kconfig" source "kernel/Kconfig.freezer"
arch/h8300/Kconfig +0 -7
@@ -1,10 +1,3 @@ -# -# For a description of the syntax of this configuration file, -# see Documentation/kbuild/kconfig-language.txt. -# - -mainmenu "uClinux/h8300 (w/o MMU) Kernel Configuration" - config H8300 bool default y
arch/ia64/Kconfig +0 -7
@@ -1,10 +1,3 @@ -# -# For a description of the syntax of this configuration file, -# see Documentation/kbuild/kconfig-language.txt. -# - -mainmenu "IA-64 Linux Kernel Configuration" - source "init/Kconfig" source "kernel/Kconfig.freezer"
arch/m32r/Kconfig +0 -7
@@ -1,10 +1,3 @@ -# -# For a description of the syntax of this configuration file, -# see Documentation/kbuild/kconfig-language.txt. -# - -mainmenu "Linux/M32R Kernel Configuration" - config M32R bool default y
arch/m68k/Kconfig +0 -6
@@ -1,7 +1,3 @@ -# -# For a description of the syntax of this configuration file, -# see Documentation/kbuild/kconfig-language.txt. -# config M68K bool default y
@@ -62,8 +58,6 @@ config HZ config ARCH_USES_GETTIMEOFFSET def_bool y -mainmenu "Linux/68k Kernel Configuration" - source "init/Kconfig" source "kernel/Kconfig.freezer"
arch/m68knommu/Kconfig +0 -7
@@ -1,10 +1,3 @@ -# -# For a description of the syntax of this configuration file, -# see Documentation/kbuild/kconfig-language.txt. -# - -mainmenu "uClinux/68k (w/o MMU) Kernel Configuration" - config M68K bool default y
arch/microblaze/Kconfig +0 -5
@@ -1,8 +1,3 @@ -# For a description of the syntax of this configuration file, -# see Documentation/kbuild/kconfig-language.txt. - -mainmenu "Linux/Microblaze Kernel Configuration" - config MICROBLAZE def_bool y select HAVE_MEMBLOCK
arch/mips/Kconfig +0 -2
@@ -14,8 +14,6 @@ config MIPS select HAVE_KRETPROBES select RTC_LIB if !MACH_LOONGSON -mainmenu "Linux/MIPS Kernel Configuration" - menu "Machine selection" config ZONE_DMA
arch/mn10300/Kconfig +0 -9
@@ -1,10 +1,3 @@ -# -# For a description of the syntax of this configuration file, -# see Documentation/kbuild/kconfig-language.txt. -# - -mainmenu "Linux Kernel Configuration" - config MN10300 def_bool y select HAVE_OPROFILE
@@ -66,8 +59,6 @@ config HZ int default 1000 -mainmenu "Matsushita MN10300/AM33 Kernel Configuration" - source "init/Kconfig" source "kernel/Kconfig.freezer"
arch/parisc/Kconfig +0 -7
@@ -1,10 +1,3 @@ -# -# For a description of the syntax of this configuration file, -# see Documentation/kbuild/kconfig-language.txt. -# - -mainmenu "Linux/PA-RISC Kernel Configuration" - config PARISC def_bool y select HAVE_IDE
arch/powerpc/Kconfig +0 -6
@@ -1,9 +1,3 @@ -# For a description of the syntax of this configuration file, -# see Documentation/kbuild/kconfig-language.txt. -# - -mainmenu "Linux/PowerPC Kernel Configuration" - source "arch/powerpc/platforms/Kconfig.cputype" config PPC32
arch/s390/Kconfig +0 -7
@@ -1,8 +1,3 @@ -# -# For a description of the syntax of this configuration file, -# see Documentation/kbuild/kconfig-language.txt. -# - config SCHED_MC def_bool y depends on SMP
@@ -75,8 +70,6 @@ config VIRT_CPU_ACCOUNTING config ARCH_SUPPORTS_DEBUG_PAGEALLOC def_bool y -mainmenu "Linux Kernel Configuration" - config S390 def_bool y select USE_GENERIC_SMP_HELPERS if SMP
arch/score/Kconfig +0 -5
@@ -1,8 +1,3 @@ -# For a description of the syntax of this configuration file, -# see Documentation/kbuild/kconfig-language.txt. - -mainmenu "Linux/SCORE Kernel Configuration" - menu "Machine selection" choice
arch/sh/Kconfig +0 -7
@@ -1,10 +1,3 @@ -# -# For a description of the syntax of this configuration file, -# see Documentation/kbuild/kconfig-language.txt. -# - -mainmenu "Linux/SuperH Kernel Configuration" - config SUPERH def_bool y select EMBEDDED
arch/sparc/Kconfig +0 -6
@@ -1,9 +1,3 @@ -# For a description of the syntax of this configuration file, -# see Documentation/kbuild/kconfig-language.txt. -# - -mainmenu "Linux/SPARC Kernel Configuration" - config 64BIT bool "64-bit kernel" if ARCH = "sparc" default ARCH = "sparc64"
arch/tile/Kconfig +0 -2
@@ -113,8 +113,6 @@ config TILE # config HUGETLB_PAGE_SIZE_VARIABLE -mainmenu "Linux/TILE Kernel Configuration" - # Please note: TILE-Gx support is not yet finalized; this is # the preliminary support. TILE-Gx drivers are only provided # with the alpha or beta test versions for Tilera customers.
arch/um/Kconfig.common +0 -2
@@ -19,8 +19,6 @@ config MMU config NO_IOMEM def_bool y -mainmenu "Linux/Usermode Kernel Configuration" - config ISA bool
arch/x86/Kconfig +0 -3
@@ -1,6 +1,3 @@ -# x86 configuration -mainmenu "Linux Kernel Configuration for x86" - # Select 32 or 64 bit config 64BIT bool "64-bit kernel" if ARCH = "x86"
arch/xtensa/Kconfig +0 -5
@@ -1,8 +1,3 @@ -# For a description of the syntax of this configuration file, -# see Documentation/kbuild/kconfig-language.txt. - -mainmenu "Linux/Xtensa Kernel Configuration" - config FRAME_POINTER def_bool n
scripts/kconfig/Makefile +1 -1
@@ -8,7 +8,7 @@ PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-c ifdef KBUILD_KCONFIG Kconfig := $(KBUILD_KCONFIG) else -Kconfig := arch/$(SRCARCH)/Kconfig +Kconfig := Kconfig endif xconfig: $(obj)/qconf
Signature · 1 line
1.7.2.30.gc37d7.dirty
[DIFF] kbuild-generic-v5 -> kbuild-generic-v6
In reply to Arnaud LacombeHi,
Changes since branch `kbuild-generic-v5' are:
- Randy's comments about typos and copy/paste mistake
- fix in the autoconf.h header generation
- extra strdup() removal
- const updates
The updated series is available in the git repository at:
git://github.com/lacombar/linux-2.6.git kbuild-generic-v6
Thanks,
- Arnaud
--- scripts/kconfig/confdata.c | 4 ++-- scripts/kconfig/lex.zconf.c_shipped | 2 +- scripts/kconfig/lkc.h | 2 +- scripts/kconfig/mconf.c | 2 +- scripts/kconfig/menu.c | 2 +- scripts/kconfig/nconf.c | 6 +++--- scripts/kconfig/util.c | 2 +- scripts/kconfig/zconf.l | 2 +- scripts/kconfig/zconf.tab.c_shipped | 2 +- scripts/kconfig/zconf.y | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-)
scripts/kconfig/confdata.c +2 -2
@@ -807,11 +807,11 @@ int conf_write_autoconf(void) "\n");fprintf (out_h,"/*\n" " * Automatically generated C config: don't edit\n" -" * Linux kernel version: %s\n" +" * %s\n" " * %s" " */\n" "#define AUTOCONF_INCLUDED\n" , -sym_get_string_value (sym),ctime (&now)); + rootmenu.prompt->text,ctime (&now)); for_all_symbols(i, sym) {sym_calc_value (sym);
scripts/kconfig/lex.zconf.c_shipped +1 -1
@@ -2423,7 +2423,7 @@ int zconf_lineno(void) return current_pos.lineno; } -char *zconf_curname(void) +const char *zconf_curname(void) { return current_pos.file ? current_pos.file->name : "<none>"; }
scripts/kconfig/lkc.h +1 -1
@@ -76,7 +76,7 @@ FILE *zconf_fopen(const char *name);void zconf_initscan (const char *name);void zconf_nextfile (const char *name);int zconf_lineno (void ); -char *zconf_curname (void ); +const char *zconf_curname (void );/* conf.c */ void xfgets (char *str,int size,FILE *in);
scripts/kconfig/mconf.c +1 -1
@@ -25,7 +25,7 @@static const char mconf_readme[] =N_ ("Overview\n" "--------\n" -"This interface let you select features and parameters for the build\n" +"This interface let you select features and parameters for the build.\n" "Features can either be built-in, modularized, or ignored. Parameters\n" "must be entered in as decimal or hexadecimal numbers or text.\n" "\n"
scripts/kconfig/menu.c +1 -1
@@ -10,7 +10,7 @@#include "lkc.h" static const char nohelp_text[] =N_ ( -"There is no help available for this kernel option.\n" ); +"There is no help available for this option.\n" );struct menu rootmenu;static struct menu **last_entry_ptr;
scripts/kconfig/nconf.c +3 -3
@@ -15,7 +15,7 @@static const char nconf_readme[] =N_ ("Overview\n" "--------\n" -"This interface let you select features and parameters for the build\n" +"This interface let you select features and parameters for the build.\n" "Features can either be built-in, modularized, or ignored. Parameters\n" "must be entered in as decimal or hexadecimal numbers or text.\n" "\n"
@@ -127,8 +127,8 @@ static const char nconf_readme[] = N_("Optional personality available\n" "------------------------------\n" "If you prefer to have all of the options listed in a single menu, rather\n" -"than the default multimenu hierarchy, run the menuconfig with\n" -"NCONFIG_MODE environment variable set to single_menu. Example:\n" +"than the default multimenu hierarchy, run the nconfig with NCONFIG_MODE\n" +"environment variable set to single_menu. Example:\n" "\n" "make NCONFIG_MODE=single_menu nconfig\n" "\n"
scripts/kconfig/util.c +1 -1
@@ -16,7 +16,7 @@ struct file *file_lookup(const char *name)for (file = file_list; file; file = file->next) {if (!strcmp (name, file->name)) { -free (file_name); +free ((void *)file_name);return file; } }
scripts/kconfig/zconf.l +1 -1
@@ -354,7 +354,7 @@ int zconf_lineno(void) return current_pos.lineno; } -char *zconf_curname(void) +const char *zconf_curname(void) { return current_pos.file ? current_pos.file->name : "<none>"; }
scripts/kconfig/zconf.tab.c_shipped +1 -1
@@ -2255,7 +2255,7 @@ void conf_parse(const char *name) prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0)); } - rootmenu.prompt->text = strdup(_(rootmenu.prompt->text)); + rootmenu.prompt->text = _(rootmenu.prompt->text); rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text); menu_finalize(&rootmenu);
scripts/kconfig/zconf.y +1 -1
@@ -503,7 +503,7 @@ void conf_parse(const char *name) prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0)); } - rootmenu.prompt->text = strdup(_(rootmenu.prompt->text)); + rootmenu.prompt->text = _(rootmenu.prompt->text); rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text); menu_finalize(&rootmenu);
Signature · 1 line
1.7.2.30.gc37d7.dirty
[DIFF] kbuild-generic-v6 -> kbuild/kconfig/kbuild-generic-v7
Hi,
Changes since branch `kbuild-generic-v6' are:
- rebase against `kbuild/kconfig'
- extra parens/column fixes after Michal's comments
- delayed window initialization for gconf in order to wait for rootmenu initialization.
- commit tagging
Note that I kept the grammar change and parser regeneration in two separate commits, one after the other.
This branch merge without conflict with 2.6.36-rc5 and the next-20100921 tree. Tested with {x,n,menu}config on i386, sh and um.
The updated series is available in the git repository at:
git://github.com/lacombar/linux-2.6.git kbuild/kconfig/kbuild-generic-v7
Thanks,
- Arnaud
--- scripts/kconfig/gconf.c | 12 ++++++------ scripts/kconfig/nconf.c | 2 +- scripts/kconfig/qconf.cc | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-)
scripts/kconfig/gconf.c +6 -6
@@ -1527,12 +1527,6 @@ int main(int ac, char *av[])else glade_file =g_strconcat (g_get_current_dir (),"/" , av[0 ],".glade" ,NULL ); -/* Load the interface and connect signals */ -init_main_window (glade_file); -init_tree_model (); -init_left_tree (); -init_right_tree (); -/* Conf stuffs */ if (ac >1 && av[1 ][0 ] =='-' ) {switch (av[1 ][1 ]) {
@@ -1552,6 +1546,12 @@ int main(int ac, char *av[])fixup_rootmenu (&rootmenu);conf_read (NULL ); +/* Load the interface and connect signals */ +init_main_window (glade_file); +init_tree_model (); +init_left_tree (); +init_right_tree (); +switch (view_mode) {case SINGLE_VIEW :display_tree_part ();
scripts/kconfig/nconf.c +1 -1
@@ -702,7 +702,7 @@ static int do_exit(void)char buf[1024 ];snprintf (buf,1024 ,_ ("Configuration written to %s\n" - "End of the configuration.\n": +"End of the configuration.\n" "Execute 'make' to start the build or try" " 'make help'." ), filename); btn_dialog(
scripts/kconfig/qconf.cc +1 -1
@@ -1274,7 +1274,7 @@ ConfigMainWindow::ConfigMainWindow(void) char title[256]; QDesktopWidget *d = configApp->desktop(); - snprintf(title, sizeof(title), "%s%s"), + snprintf(title, sizeof(title), "%s%s", rootmenu.prompt->text, #if QT_VERSION < 0x040000 " (Qt3)"
Signature · 1 line
1.7.2.30.gc37d7.dirty
Re: [DIFF] kbuild-generic-v6 -> kbuild/kconfig/kbuild-generic-v7
Quoted 12 lines · Arnaud Lacombe
Hi,
Changes since branch `kbuild-generic-v6' are:
- rebase against `kbuild/kconfig'
- extra parens/column fixes after Michal's comments
- delayed window initialization for gconf in order to wait for rootmenu initialization.
- commit taggingNote that I kept the grammar change and parser regeneration in two separate commits, one after the other.
Quoted 6 lines
This branch merge without conflict with 2.6.36-rc5 and the next-20100921 tree. Tested with {x,n,menu}config on i386, sh and um.
The updated series is available in the git repository at:
git://github.com/lacombar/linux-2.6.gitkbuild/kconfig/kbuild-generic-v7
Pulled, thanks.
Michal
Dne 11.9.2010 17:51, Arnaud Lacombe napsal(a):
Quoted 13 lines
Hi Sam, Michal,
You'll find hereafter the series for kconfig generalization and interfaces changes with the rest of the kernel.
A quick summary of the serie is:
- patch 1 -> 3: handles theCONFIG_prefix, its build time definition and its
mention in help text.
- patch 4: handles the reference to the 'kernel' keyword in various strings.
- patch 5: takes care of the "linux" domain name used to get translation informations.
- patch 6 -> 15 handles the mainmenu syntax changes and related.
Quoted 3 lines
This series is available in the git repository at:
git://github.com/lacombar/linux-2.6.gitkbuild-generic-v5
Hi Arnaud,
sorry for the delay, I have the bad habit of shifting more complex things away :(. Except the comments I sent as replies to the three patches, I have only one thing: Publishing the git branch makes it much more convenient for me to review it, but could you please base the next version on either the kconfig branch of kbuild-2.6.git or on some tagged release of Linus' tree? That way I can directly merge it into the kconfig branch, which I can't if you base on the for-next branch (see
http://git.kernel.org/?p=linux/kernel/git/mmarek/kbuild-2.6.git;a=blob;h=refs/tags/README-KBUILD
for explanaton).
Thanks,
Michal
Quoted 4 lines · Arnaud Lacombe
Hi Sam, Michal,
You'll find hereafter the series for kconfig generalization and interfaces changes with the rest of the kernel.
Hi Arnaud.
Looks good.
Feel free to add:
on all patches.
I had one comment related to mainmenu - see separate mail.
Sam