* [RFC 0/2] Factor Kconfig's prefix and package name
@ 2010-08-16 4:54 Arnaud Lacombe
2010-08-16 4:54 ` [RFC 1/2] kbuild: genericizes " Arnaud Lacombe
` (2 more replies)
0 siblings, 3 replies; 23+ messages in thread
From: Arnaud Lacombe @ 2010-08-16 4:54 UTC (permalink / raw)
To: Sam Ravnborg, Roman Zippel; +Cc: linux-kbuild, Arnaud Lacombe
Hi,
Many projects are using Kconfig's derivate as their configuration UI. Some of
these projects change the default "CONFIG_" prefix for something else. It
obliges them to dig in the sources to find and replace all occurences and
associated constant. Same goes for package name where when the project ship a C
library, messages about a kernel may not be welcome. OOTH, a project may want to
limit its changes to be able to re-sync with the kernel's Kconfig and benefits
from latest features and bug fixes.
The two next patches factorizes Kconfig's prefix and package name to generic
macros defined in `scripts/kconfig/lkc.h'. This allow projects to easily tune
Kconfig for their need with trivial source modification.
There may have been similar patches in the past, in which case this message can
be silently discarded :)
any comments appreciated !
- Arnaud
Arnaud Lacombe (2):
kbuild: genericizes package name
kbuild: genericizes kbuild's config prefix
scripts/kconfig/conf.c | 12 ++++----
scripts/kconfig/confdata.c | 48 +++++++++++++++++-----------------
scripts/kconfig/gconf.c | 4 +-
scripts/kconfig/lkc.h | 7 ++++-
scripts/kconfig/mconf.c | 44 ++++++++++++++++----------------
scripts/kconfig/menu.c | 2 +-
scripts/kconfig/nconf.c | 40 ++++++++++++++---------------
scripts/kconfig/qconf.cc | 6 ++--
scripts/kconfig/zconf.tab.c_shipped | 2 +-
scripts/kconfig/zconf.y | 2 +-
10 files changed, 85 insertions(+), 82 deletions(-)
--
1.7.2.30.gc37d7.dirty
^ permalink raw reply [flat|nested] 23+ messages in thread
* [RFC 1/2] kbuild: genericizes package name
2010-08-16 4:54 [RFC 0/2] Factor Kconfig's prefix and package name Arnaud Lacombe
@ 2010-08-16 4:54 ` Arnaud Lacombe
2010-08-16 11:57 ` Michal Marek
2010-08-16 4:54 ` [RFC 2/2] kbuild: genericizes kbuild's config prefix Arnaud Lacombe
2010-08-16 12:36 ` [RFC 0/2] Factor Kconfig's prefix and package name Sam Ravnborg
2 siblings, 1 reply; 23+ messages in thread
From: Arnaud Lacombe @ 2010-08-16 4:54 UTC (permalink / raw)
To: Sam Ravnborg, Roman Zippel; +Cc: linux-kbuild, Arnaud Lacombe
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
---
scripts/kconfig/conf.c | 12 ++++++------
scripts/kconfig/confdata.c | 8 ++++----
scripts/kconfig/gconf.c | 4 ++--
scripts/kconfig/lkc.h | 7 ++++++-
scripts/kconfig/mconf.c | 34 +++++++++++++++++-----------------
scripts/kconfig/nconf.c | 20 +++++++++-----------
scripts/kconfig/qconf.cc | 6 +++---
scripts/kconfig/zconf.tab.c_shipped | 2 +-
scripts/kconfig/zconf.y | 2 +-
9 files changed, 49 insertions(+), 46 deletions(-)
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 5b7c86e..8233d85 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -508,8 +508,8 @@ 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"
+ "*** " PACKAGE_LONG " has not yet been configured.\n"
"***\n"
"*** Please run some configurator (e.g. \"make oldconfig\" or\n"
"*** \"make menuconfig\" or \"make xconfig\").\n"
@@ -571,7 +571,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*** " PACKAGE_LONG " configuration requires explicit update.\n\n"));
return 1;
}
}
@@ -623,11 +623,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 " PACKAGE_LONG " 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 " PACKAGE_LONG " configuration.\n\n"));
return 1;
}
} else if (input_mode == savedefconfig) {
@@ -638,7 +638,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 " PACKAGE_LONG " configuration.\n\n"));
exit(1);
}
}
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index c39327e..74327c3 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -579,7 +579,7 @@ int conf_write(const char *name)
if (!out)
return 1;
- sym = sym_lookup("KERNELVERSION", 0);
+ sym = sym_lookup("PROJECTVERSION", 0);
sym_calc_value(sym);
time(&now);
env = getenv("KCONFIG_NOTIMESTAMP");
@@ -588,7 +588,7 @@ int conf_write(const char *name)
fprintf(out, _("#\n"
"# Automatically generated make config: don't edit\n"
- "# Linux kernel version: %s\n"
+ "# " PACKAGE_LONG " version: %s\n"
"%s%s"
"#\n"),
sym_get_string_value(sym),
@@ -807,7 +807,7 @@ int conf_write_autoconf(void)
time(&now);
fprintf(out, "#\n"
"# Automatically generated make config: don't edit\n"
- "# Linux kernel version: %s\n"
+ "# " PACKAGE_LONG " version: %s\n"
"# %s"
"#\n",
sym_get_string_value(sym), ctime(&now));
@@ -816,7 +816,7 @@ int conf_write_autoconf(void)
"\n");
fprintf(out_h, "/*\n"
" * Automatically generated C config: don't edit\n"
- " * Linux kernel version: %s\n"
+ " * " PACKAGE_LONG " version: %s\n"
" * %s"
" */\n"
"#define AUTOCONF_INCLUDED\n",
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index d669882..0f93dc6 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -210,8 +210,8 @@ void init_main_window(const gchar * glade_file)
/*"style", PANGO_STYLE_OBLIQUE, */
NULL);
- sprintf(title, _("Linux Kernel v%s Configuration"),
- getenv("KERNELVERSION"));
+ sprintf(title, _("%s v%s Configuration"),
+ PACKAGE_LONG, getenv("KERNELVERSION"));
gtk_window_set_title(GTK_WINDOW(main_wnd), title);
gtk_widget_show(main_wnd);
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index bdf71bd..1fcd756 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -31,7 +31,12 @@ extern "C" {
#define SRCTREE "srctree"
-#define PACKAGE "linux"
+#define PACKAGE "linux"
+#define PACKAGE_LONG "Linux Kernel"
+
+#define KBUILD_PREFIX "CONFIG_"
+#define KBUILD_PREFIX_LEN (sizeof(KBUILD_PREFIX) - 1)
+
#define LOCALEDIR "/usr/share/locale"
#define _(text) gettext(text)
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index d2f6e05..c2caf0c 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -25,10 +25,10 @@
static const char mconf_readme[] = N_(
"Overview\n"
"--------\n"
-"Some kernel features may be built directly into the kernel.\n"
+"Some " PACKAGE_LONG " features may be built directly into it.\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"
+PACKAGE_LONG " parameters which are not really features, but must be\n"
"entered in as decimal or hexadecimal numbers or possibly text.\n"
"\n"
"Menu items beginning with following braces represent features that\n"
@@ -117,7 +117,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 " PACKAGE_LONG " 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,7 +150,7 @@ 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"
+"If you prefer to have all of the " PACKAGE_LONG " 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"
"\n"
@@ -207,11 +207,11 @@ 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 " PACKAGE_LONG "\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"
+ PACKAGE_LONG "'s default, entering the name of the file here will allow you\n"
"to modify that configuration.\n"
"\n"
"If you are uncertain, then you have probably never used alternate\n"
@@ -221,7 +221,7 @@ 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"
+ "For various reasons, one may wish to keep different " PACKAGE_LONG "\n"
"configurations available on a single machine.\n"
"\n"
"Entering a file name here will allow you to later retrieve, modify\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 " KBUILD_PREFIX " symbols containing USB\n"
+ " ^USB => find all " KBUILD_PREFIX " symbols starting with USB\n"
+ " USB$ => find all " KBUILD_PREFIX " symbols ending with USB\n"
"\n");
static int indent;
@@ -292,10 +292,10 @@ static void set_config_filename(const char *config_filename)
int size;
struct symbol *sym;
- sym = sym_lookup("KERNELVERSION", 0);
+ sym = sym_lookup("PROJECTVERSION", 0);
sym_calc_value(sym);
size = snprintf(menu_backtitle, sizeof(menu_backtitle),
- _("%s - Linux Kernel v%s Configuration"),
+ _("%s - %s v%s Configuration"), PACKAGE_LONG,
config_filename, sym_get_string_value(sym));
if (size >= sizeof(menu_backtitle))
menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
@@ -834,7 +834,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 +846,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 " PACKAGE_LONG " configuration changes were NOT saved."
"\n\n"));
return 1;
}
case -1:
printf(_("\n\n"
- "*** End of Linux kernel configuration.\n"
+ "*** End of " PACKAGE_LONG " configuration.\n"
"*** Execute 'make' to build the kernel or try 'make help'."
"\n\n"));
break;
default:
fprintf(stderr, _("\n\n"
- "Your kernel configuration changes were NOT saved."
+ "Your " PACKAGE_LONG " configuration changes were NOT saved."
"\n\n"));
}
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
index 2ba71bc..f5550a9 100644
--- a/scripts/kconfig/nconf.c
+++ b/scripts/kconfig/nconf.c
@@ -12,10 +12,10 @@
static const char nconf_readme[] = N_(
"Overview\n"
"--------\n"
-"Some kernel features may be built directly into the kernel.\n"
+"Some " PACKAGE_LONG " features may be built directly in it.\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"
+PACKAGE_LONG " parameters which are not really features, but must be\n"
"entered in as decimal or hexadecimal numbers or possibly text.\n"
"\n"
"Menu items beginning with following braces represent features that\n"
@@ -695,10 +695,10 @@ static const char *set_config_filename(const char *config_filename)
int size;
struct symbol *sym;
- sym = sym_lookup("KERNELVERSION", 0);
+ sym = sym_lookup("PROJECTVERSION", 0);
sym_calc_value(sym);
size = snprintf(menu_backtitle, sizeof(menu_backtitle),
- _("%s - Linux Kernel v%s Configuration"),
+ _("%s - %s v%s Configuration"), PACKAGE_LONG,
config_filename, sym_get_string_value(sym));
if (size >= sizeof(menu_backtitle))
menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
@@ -739,8 +739,7 @@ static int do_exit(void)
return 0;
}
res = btn_dialog(main_window,
- _("Do you wish to save your "
- "new kernel configuration?\n"
+ _("Do you wish to save your new configuration?\n"
"<ESC> to cancel and resume nconfig."),
2,
" <save> ",
@@ -759,9 +758,8 @@ static int do_exit(void)
if (res)
btn_dialog(
main_window,
- _("Error during writing of the kernel "
- "configuration.\n"
- "Your kernel configuration "
+ _("Error during writing of configuration.\n"
+ "Your " PACKAGE_LONG " configuration "
"changes were NOT saved."),
1,
"<OK>");
@@ -769,7 +767,7 @@ static int do_exit(void)
char buf[1024];
snprintf(buf, 1024,
_("Configuration written to %s\n"
- "End of Linux kernel configuration.\n"
+ "End of " PACKAGE_LONG " configuration.\n"
"Execute 'make' to build the kernel or try"
" 'make help'."), filename);
btn_dialog(
@@ -782,7 +780,7 @@ static int do_exit(void)
default:
btn_dialog(
main_window,
- _("Your kernel configuration changes were NOT saved."),
+ _("Your " PACKAGE_LONG " configuration changes were NOT saved."),
1,
"<OK>");
break;
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 820df2d..9bcf572 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1263,8 +1263,8 @@ ConfigMainWindow::ConfigMainWindow(void)
char title[256];
QDesktopWidget *d = configApp->desktop();
- snprintf(title, sizeof(title), _("Linux Kernel v%s Configuration"),
- getenv("KERNELVERSION"));
+ snprintf(title, sizeof(title), _("%s v%s Configuration"),
+ PACKAGE_LONG, getenv("PROJECTVERSION"));
setCaption(title);
width = configSettings->readNumEntry("/window width", d->width() - 64);
@@ -1633,7 +1633,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 for " PACKAGE_LONG ".\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"
diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped
index 32a9eef..b8a7dad 100644
--- a/scripts/kconfig/zconf.tab.c_shipped
+++ b/scripts/kconfig/zconf.tab.c_shipped
@@ -2224,7 +2224,7 @@ void conf_parse(const char *name)
modules_sym = sym_lookup(NULL, 0);
modules_sym->type = S_BOOLEAN;
modules_sym->flags |= SYMBOL_AUTO;
- rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
+ rootmenu.prompt = menu_add_prompt(P_MENU, PACKAGE_LONG " Configuration", NULL);
#if YYDEBUG
if (getenv("ZCONF_DEBUG"))
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 23dfd3b..9dc83e6 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -479,7 +479,7 @@ void conf_parse(const char *name)
modules_sym = sym_lookup(NULL, 0);
modules_sym->type = S_BOOLEAN;
modules_sym->flags |= SYMBOL_AUTO;
- rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
+ rootmenu.prompt = menu_add_prompt(P_MENU, PACKAGE_LONG " Configuration", NULL);
#if YYDEBUG
if (getenv("ZCONF_DEBUG"))
--
1.7.2.30.gc37d7.dirty
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [RFC 2/2] kbuild: genericizes kbuild's config prefix
2010-08-16 4:54 [RFC 0/2] Factor Kconfig's prefix and package name Arnaud Lacombe
2010-08-16 4:54 ` [RFC 1/2] kbuild: genericizes " Arnaud Lacombe
@ 2010-08-16 4:54 ` Arnaud Lacombe
2010-08-16 12:36 ` [RFC 0/2] Factor Kconfig's prefix and package name Sam Ravnborg
2 siblings, 0 replies; 23+ messages in thread
From: Arnaud Lacombe @ 2010-08-16 4:54 UTC (permalink / raw)
To: Sam Ravnborg, Roman Zippel; +Cc: linux-kbuild, Arnaud Lacombe
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
---
scripts/kconfig/confdata.c | 40 ++++++++++++++++++++--------------------
scripts/kconfig/mconf.c | 10 +++++-----
| 2 +-
scripts/kconfig/nconf.c | 20 ++++++++++----------
4 files changed, 36 insertions(+), 36 deletions(-)
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 74327c3..f0f6cdc 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -222,22 +222,22 @@ load:
sym = NULL;
switch (line[0]) {
case '#':
- if (memcmp(line + 2, "CONFIG_", 7))
+ if (memcmp(line + 2, KBUILD_PREFIX, KBUILD_PREFIX_LEN))
continue;
- p = strchr(line + 9, ' ');
+ p = strchr(line + 2 + KBUILD_PREFIX_LEN, ' ');
if (!p)
continue;
*p++ = 0;
if (strncmp(p, "is not set", 10))
continue;
if (def == S_DEF_USER) {
- sym = sym_find(line + 9);
+ sym = sym_find(line + 2 + KBUILD_PREFIX_LEN);
if (!sym) {
sym_add_change_count(1);
break;
}
} else {
- sym = sym_lookup(line + 9, 0);
+ sym = sym_lookup(line + 2 + KBUILD_PREFIX_LEN, 0);
if (sym->type == S_UNKNOWN)
sym->type = S_BOOLEAN;
}
@@ -255,11 +255,11 @@ load:
}
break;
case 'C':
- if (memcmp(line, "CONFIG_", 7)) {
+ if (memcmp(line, KBUILD_PREFIX, KBUILD_PREFIX_LEN)) {
conf_warning("unexpected data");
continue;
}
- p = strchr(line + 7, '=');
+ p = strchr(line + KBUILD_PREFIX_LEN, '=');
if (!p)
continue;
*p++ = 0;
@@ -270,13 +270,13 @@ load:
*p2 = 0;
}
if (def == S_DEF_USER) {
- sym = sym_find(line + 7);
+ sym = sym_find(line + KBUILD_PREFIX_LEN);
if (!sym) {
sym_add_change_count(1);
break;
}
} else {
- sym = sym_lookup(line + 7, 0);
+ sym = sym_lookup(line + KBUILD_PREFIX_LEN, 0);
if (sym->type == S_UNKNOWN)
sym->type = S_OTHER;
}
@@ -405,9 +405,9 @@ static void conf_write_string(bool headerfile, const char *name,
{
int l;
if (headerfile)
- fprintf(out, "#define CONFIG_%s \"", name);
+ fprintf(out, "#define " KBUILD_PREFIX "%s \"", name);
else
- fprintf(out, "CONFIG_%s=\"", name);
+ fprintf(out, KBUILD_PREFIX "%s=\"", name);
while (1) {
l = strcspn(str, "\"\\");
@@ -433,13 +433,13 @@ static void conf_write_symbol(struct symbol *sym, enum symbol_type type,
switch (sym_get_tristate_value(sym)) {
case no:
if (write_no)
- fprintf(out, "# CONFIG_%s is not set\n", sym->name);
+ fprintf(out, "# " KBUILD_PREFIX "%s is not set\n", sym->name);
break;
case mod:
- fprintf(out, "CONFIG_%s=m\n", sym->name);
+ fprintf(out, KBUILD_PREFIX "%s=m\n", sym->name);
break;
case yes:
- fprintf(out, "CONFIG_%s=y\n", sym->name);
+ fprintf(out, KBUILD_PREFIX "%s=y\n", sym->name);
break;
}
break;
@@ -449,7 +449,7 @@ static void conf_write_symbol(struct symbol *sym, enum symbol_type type,
case S_HEX:
case S_INT:
str = sym_get_string_value(sym);
- fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
+ fprintf(out, KBUILD_PREFIX "%s=%s\n", sym->name, str);
break;
case S_OTHER:
case S_UNKNOWN:
@@ -838,14 +838,14 @@ int conf_write_autoconf(void)
case no:
break;
case mod:
- fprintf(tristate, "CONFIG_%s=M\n", sym->name);
- fprintf(out_h, "#define CONFIG_%s_MODULE 1\n", sym->name);
+ fprintf(tristate, KBUILD_PREFIX "%s=M\n", sym->name);
+ fprintf(out_h, "#define " KBUILD_PREFIX "%s_MODULE 1\n", sym->name);
break;
case yes:
if (sym->type == S_TRISTATE)
- fprintf(tristate, "CONFIG_%s=Y\n",
+ fprintf(tristate, KBUILD_PREFIX "%s=Y\n",
sym->name);
- fprintf(out_h, "#define CONFIG_%s 1\n", sym->name);
+ fprintf(out_h, "#define " KBUILD_PREFIX "%s 1\n", sym->name);
break;
}
break;
@@ -855,12 +855,12 @@ int conf_write_autoconf(void)
case S_HEX:
str = sym_get_string_value(sym);
if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
- fprintf(out_h, "#define CONFIG_%s 0x%s\n", sym->name, str);
+ fprintf(out_h, "#define " KBUILD_PREFIX "%s 0x%s\n", sym->name, str);
break;
}
case S_INT:
str = sym_get_string_value(sym);
- fprintf(out_h, "#define CONFIG_%s %s\n", sym->name, str);
+ fprintf(out_h, "#define " KBUILD_PREFIX "%s %s\n", sym->name, str);
break;
default:
break;
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index c2caf0c..b9b08cd 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -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 " KBUILD_PREFIX " 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 " KBUILD_PREFIX " 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"
@@ -316,7 +316,7 @@ static void search_conf(void)
again:
dialog_clear();
dres = dialog_inputbox(_("Search Configuration Parameter"),
- _("Enter CONFIG_ (sub)string to search for "
+ _("Enter " KBUILD_PREFIX " (sub)string to search for "
"(with or without \"CONFIG\")"),
10, 75, "");
switch (dres) {
@@ -329,9 +329,9 @@ again:
return;
}
- /* strip CONFIG_ if necessary */
+ /* strip the prefix if necessary */
dialog_input = dialog_input_result;
- if (strncasecmp(dialog_input_result, "CONFIG_", 7) == 0)
+ if (strncasecmp(dialog_input_result, KBUILD_PREFIX, KBUILD_PREFIX_LEN) == 0)
dialog_input += 7;
sym_arr = sym_re_search(dialog_input);
--git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 4fb5902..b4800d8 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -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, KBUILD_PREFIX "%s:\n\n", sym->name);
str_append(help, _(menu_get_help(menu)));
str_append(help, "\n");
}
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
index f5550a9..6cb19dc 100644
--- a/scripts/kconfig/nconf.c
+++ b/scripts/kconfig/nconf.c
@@ -210,7 +210,7 @@ save_config_help[] = N_(
"leave this blank.\n"),
search_help[] = N_(
"\n"
-"Search for CONFIG_ symbols and display their relations.\n"
+"Search for " KBUILD_PREFIX " symbols and display their relations.\n"
"Regular expressions are allowed.\n"
"Example: search for \"^FOO\"\n"
"Result:\n"
@@ -227,7 +227,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 " KBUILD_PREFIX " 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"
@@ -243,9 +243,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 " KBUILD_PREFIX " symbols containing USB\n"
+" ^USB => find all " KBUILD_PREFIX " symbols starting with USB\n"
+" USB$ => find all " KBUILD_PREFIX " symbols ending with USB\n"
"\n");
struct mitem {
@@ -800,8 +800,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 " KBUILD_PREFIX " (sub)string to search for "
+ "(with or without \"" KBUILD_PREFIX "\")"),
"", dialog_input_result, 99);
switch (dres) {
case 0:
@@ -814,9 +814,9 @@ again:
return;
}
- /* strip CONFIG_ if necessary */
+ /* strip the prefix if necessary */
dialog_input = dialog_input_result;
- if (strncasecmp(dialog_input_result, "CONFIG_", 7) == 0)
+ if (strncasecmp(dialog_input_result, KBUILD_PREFIX, KBUILD_PREFIX_LEN) == 0)
dialog_input += 7;
sym_arr = sym_re_search(dialog_input);
@@ -1246,7 +1246,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, KBUILD_PREFIX "%s:\n\n", menu->sym->name);
str_append(&help, _(menu_get_help(menu)));
str_append(&help, "\n");
get_symbol_str(&help, menu->sym);
--
1.7.2.30.gc37d7.dirty
^ permalink raw reply related [flat|nested] 23+ messages in thread
* Re: [RFC 1/2] kbuild: genericizes package name
2010-08-16 4:54 ` [RFC 1/2] kbuild: genericizes " Arnaud Lacombe
@ 2010-08-16 11:57 ` Michal Marek
2010-08-16 12:23 ` Michal Marek
0 siblings, 1 reply; 23+ messages in thread
From: Michal Marek @ 2010-08-16 11:57 UTC (permalink / raw)
To: Arnaud Lacombe; +Cc: Sam Ravnborg, Roman Zippel, linux-kbuild
Dne 16.8.2010 06:54, Arnaud Lacombe napsal(a):
> - sym = sym_lookup("KERNELVERSION", 0);
> + sym = sym_lookup("PROJECTVERSION", 0);
The required change to the top-level Makefile is missing. I suggest you
rather replace "KERNELVERSION" with a macro defaulting to
"KERNELVERSION", so that we don't have to change it in the Makefile and
other scripts.
Michal
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC 1/2] kbuild: genericizes package name
2010-08-16 11:57 ` Michal Marek
@ 2010-08-16 12:23 ` Michal Marek
2010-08-16 17:26 ` Sam Ravnborg
0 siblings, 1 reply; 23+ messages in thread
From: Michal Marek @ 2010-08-16 12:23 UTC (permalink / raw)
To: Arnaud Lacombe; +Cc: Sam Ravnborg, Roman Zippel, linux-kbuild
Dne 16.8.2010 13:57, Michal Marek napsal(a):
> Dne 16.8.2010 06:54, Arnaud Lacombe napsal(a):
>> - sym = sym_lookup("KERNELVERSION", 0);
>> + sym = sym_lookup("PROJECTVERSION", 0);
>
> The required change to the top-level Makefile is missing. I suggest you
> rather replace "KERNELVERSION" with a macro defaulting to
> "KERNELVERSION", so that we don't have to change it in the Makefile and
> other scripts.
Maybe a cleaner way would be to use the same syntax as for
DEFCONFIG_LIST or MODULES, i.e. mark KERNELVERSION specially in the
Kconfig file:
config KERNELVERSION
string
option version env=
and then look for a symbol with this property in kconfig.
Michal
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC 0/2] Factor Kconfig's prefix and package name
2010-08-16 4:54 [RFC 0/2] Factor Kconfig's prefix and package name Arnaud Lacombe
2010-08-16 4:54 ` [RFC 1/2] kbuild: genericizes " Arnaud Lacombe
2010-08-16 4:54 ` [RFC 2/2] kbuild: genericizes kbuild's config prefix Arnaud Lacombe
@ 2010-08-16 12:36 ` Sam Ravnborg
2010-08-16 21:42 ` Arnaud Lacombe
` (2 more replies)
2 siblings, 3 replies; 23+ messages in thread
From: Sam Ravnborg @ 2010-08-16 12:36 UTC (permalink / raw)
To: Arnaud Lacombe; +Cc: Roman Zippel, linux-kbuild, Michal Marek
On Mon, Aug 16, 2010 at 12:54:15AM -0400, Arnaud Lacombe wrote:
> Hi,
>
> Many projects are using Kconfig's derivate as their configuration UI. Some of
> these projects change the default "CONFIG_" prefix for something else. It
> obliges them to dig in the sources to find and replace all occurences and
> associated constant. Same goes for package name where when the project ship a C
> library, messages about a kernel may not be welcome. OOTH, a project may want to
> limit its changes to be able to re-sync with the kernel's Kconfig and benefits
> from latest features and bug fixes.
>
> The two next patches factorizes Kconfig's prefix and package name to generic
> macros defined in `scripts/kconfig/lkc.h'. This allow projects to easily tune
> Kconfig for their need with trivial source modification.
>
> There may have been similar patches in the past, in which case this message can
> be silently discarded :)
>
> any comments appreciated !
Hi Arnaud.
I am very much in favour of getting kconfig less tied into the kernel.
We discussed this topic briefly af the buildrrot list the other day,
and I am started to look at it too.
What you have done below looks like similar attempts
I have seen in the past - and I did not like them then
and do not like it now.
I have outlined below there three steps needed as I see it.
And I would be very glad for help on two of these.
1) "Kernel" appear in diverse feedback texts
- Re-phrase this to refer to the configuration.
You know that you change the configuration
of kernel/buildroot/ptxdist/whatever and
there is no value of repeating this info in
the feedback texts.
- Re-phrasing have the benefit that once the
translators pick up the new version the
translated text is valied for all users.
This would not be the case if you replace
the project name.
2) References to kernel + version in title in frontends
- Use the (today unused) mainmenu entry to pick up the
title.
Consider following example:
mainmenu "Linux kernel configuration v$KERNELVERSION"
config KERNELVERSION
string
option env=KERNELVERSION
With the above exampe we no longer hardcode
the title and we use already existing features
to get the version from the environment.
The expansion of "$KERNELVERSION" to the value
of the symbol is something I only see supported
by "mainmenu".
- This should also address the cases where we
referer to the project name/version in the
.config file (see confdata.c).
3) Do not hardcode "CONFIG_"
- I suggest to introduce a single define named "CONFIG_".
All the places that hardcode the length should be
replaced by strlen(CONFIG_).
- The define should be conditional like this:
#if !defined(CONFIG_)
#define CONFIG_ "CONFIG_"
#endif
In this way other users can just use -DCONFIG_=BR2_ as they prefer.
Your patch #2 needs only small adjustments to implement 3).
Please adjust and resend.
Your patch #1 identifies all places where a re-phrase is needed.
It would be good if you could give that a try.
I am working on 2) as time permits. It seems doable.
I have something ready within a few days/weeks.
Please always cc: Michal Marek on patches touching kconfig.
He is the (unofficial) maintainer of kconfig.
We have not heard from Roman Zippel for > one year :-(
Sam
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC 1/2] kbuild: genericizes package name
2010-08-16 12:23 ` Michal Marek
@ 2010-08-16 17:26 ` Sam Ravnborg
2010-08-16 20:05 ` Michal Marek
0 siblings, 1 reply; 23+ messages in thread
From: Sam Ravnborg @ 2010-08-16 17:26 UTC (permalink / raw)
To: Michal Marek; +Cc: Arnaud Lacombe, Roman Zippel, linux-kbuild
On Mon, Aug 16, 2010 at 02:23:28PM +0200, Michal Marek wrote:
> Dne 16.8.2010 13:57, Michal Marek napsal(a):
> > Dne 16.8.2010 06:54, Arnaud Lacombe napsal(a):
> >> - sym = sym_lookup("KERNELVERSION", 0);
> >> + sym = sym_lookup("PROJECTVERSION", 0);
> >
> > The required change to the top-level Makefile is missing. I suggest you
> > rather replace "KERNELVERSION" with a macro defaulting to
> > "KERNELVERSION", so that we don't have to change it in the Makefile and
> > other scripts.
>
> Maybe a cleaner way would be to use the same syntax as for
> DEFCONFIG_LIST or MODULES, i.e. mark KERNELVERSION specially in the
> Kconfig file:
>
> config KERNELVERSION
> string
> option version env=
>
> and then look for a symbol with this property in kconfig.
I liked my proposal better - but alas that require some kconfig changes.
I would be glad to receive your opinion on the suggested changes before
putting too much time on it.
Note: I have not touced upon the "how do external projects build kconfig".
I dunno yet what to do there and I consider the other topics more relevant
as this will help existing users that have already solved the build stuff.
Sam
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC 1/2] kbuild: genericizes package name
2010-08-16 17:26 ` Sam Ravnborg
@ 2010-08-16 20:05 ` Michal Marek
0 siblings, 0 replies; 23+ messages in thread
From: Michal Marek @ 2010-08-16 20:05 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Arnaud Lacombe, Roman Zippel, linux-kbuild
Dne 16.8.2010 19:26, Sam Ravnborg napsal(a):
> On Mon, Aug 16, 2010 at 02:23:28PM +0200, Michal Marek wrote:
>> Maybe a cleaner way would be to use the same syntax as for
>> DEFCONFIG_LIST or MODULES, i.e. mark KERNELVERSION specially in the
>> Kconfig file:
>>
>> config KERNELVERSION
>> string
>> option version env=
>>
>> and then look for a symbol with this property in kconfig.
>
> I liked my proposal better - but alas that require some kconfig changes.
Support for 'option version' would also require some kconfig changes.
> I would be glad to receive your opinion on the suggested changes before
> putting too much time on it.
I'm all for rephrasing the texts to not mention "kernel" explicitly. As
for how to tackle the KERNELVERSION symbol - I have no strong opinion
either way. Both approaches would move the knowledge about the exact
symbol name to the Kconfig files, which is good. And the version string
is only used in titlebars and banners, so kconfig does not need to know
the value. I'd leave it up to Arnaud, whichever he finds easier to
implement :-).
Michal
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC 0/2] Factor Kconfig's prefix and package name
2010-08-16 12:36 ` [RFC 0/2] Factor Kconfig's prefix and package name Sam Ravnborg
@ 2010-08-16 21:42 ` Arnaud Lacombe
2010-08-16 21:50 ` Sam Ravnborg
2010-08-17 1:12 ` Arnaud Lacombe
2010-08-17 6:15 ` [RFC 0/2] Factor Kconfig's prefix and package name Arnaud Lacombe
2 siblings, 1 reply; 23+ messages in thread
From: Arnaud Lacombe @ 2010-08-16 21:42 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Roman Zippel, linux-kbuild, Michal Marek
Hi,
On Mon, Aug 16, 2010 at 8:36 AM, Sam Ravnborg <sam@ravnborg.org> wrote:
> Hi Arnaud.
>
> I am very much in favour of getting kconfig less tied into the kernel.
> We discussed this topic briefly af the buildrrot list the other day,
> and I am started to look at it too.
>
> What you have done below looks like similar attempts
> I have seen in the past - and I did not like them then
> and do not like it now.
> I have outlined below there three steps needed as I see it.
> And I would be very glad for help on two of these.
>
> 1) "Kernel" appear in diverse feedback texts
> - Re-phrase this to refer to the configuration.
> You know that you change the configuration
> of kernel/buildroot/ptxdist/whatever and
> there is no value of repeating this info in
> the feedback texts.
> - Re-phrasing have the benefit that once the
> translators pick up the new version the
> translated text is valied for all users.
> This would not be the case if you replace
> the project name.
>
sounds good. This would also eliminate the line length problem for
hardcoded paragraph.
> 2) References to kernel + version in title in frontends
> - Use the (today unused) mainmenu entry to pick up the
> title.
> Consider following example:
>
> mainmenu "Linux kernel configuration v$KERNELVERSION"
>
> config KERNELVERSION
> string
> option env=KERNELVERSION
>
> With the above exampe we no longer hardcode
> the title and we use already existing features
> to get the version from the environment.
> The expansion of "$KERNELVERSION" to the value
> of the symbol is something I only see supported
> by "mainmenu".
> - This should also address the cases where we
> referer to the project name/version in the
> .config file (see confdata.c).
>
seems a good way to go.
> 3) Do not hardcode "CONFIG_"
> - I suggest to introduce a single define named "CONFIG_".
> All the places that hardcode the length should be
> replaced by strlen(CONFIG_).
> - The define should be conditional like this:
> #if !defined(CONFIG_)
> #define CONFIG_ "CONFIG_"
> #endif
> In this way other users can just use -DCONFIG_=BR2_ as they prefer.
>
agreed. the only thing I am not really fond of is that "strlen(...)"
is computed at runtime, whereas "sizeof(...)-1" is a build time
constant, but this might not be that worth.
> Your patch #2 needs only small adjustments to implement 3).
> Please adjust and resend.
>
will do.
> Your patch #1 identifies all places where a re-phrase is needed.
> It would be good if you could give that a try.
>
will do.
> I am working on 2) as time permits. It seems doable.
> I have something ready within a few days/weeks.
>
ok.
> Please always cc: Michal Marek on patches touching kconfig.
> He is the (unofficial) maintainer of kconfig.
> We have not heard from Roman Zippel for > one year :-(
>
shouldn't MAINTAINERS be updated to reflect this ?
Thanks,
- Arnaud
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC 0/2] Factor Kconfig's prefix and package name
2010-08-16 21:42 ` Arnaud Lacombe
@ 2010-08-16 21:50 ` Sam Ravnborg
0 siblings, 0 replies; 23+ messages in thread
From: Sam Ravnborg @ 2010-08-16 21:50 UTC (permalink / raw)
To: Arnaud Lacombe; +Cc: Roman Zippel, linux-kbuild, Michal Marek
>
> > 3) Do not hardcode "CONFIG_"
> > - I suggest to introduce a single define named "CONFIG_".
> > All the places that hardcode the length should be
> > replaced by strlen(CONFIG_).
> > - The define should be conditional like this:
> > #if !defined(CONFIG_)
> > #define CONFIG_ "CONFIG_"
> > #endif
> > In this way other users can just use -DCONFIG_=BR2_ as they prefer.
> >
> agreed. the only thing I am not really fond of is that "strlen(...)"
> is computed at runtime, whereas "sizeof(...)-1" is a build time
> constant, but this might not be that worth.
gcc will recognize that strlen("CONFIG_") is a constant
and will optimize out the call.
Sam
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC 0/2] Factor Kconfig's prefix and package name
2010-08-16 12:36 ` [RFC 0/2] Factor Kconfig's prefix and package name Sam Ravnborg
2010-08-16 21:42 ` Arnaud Lacombe
@ 2010-08-17 1:12 ` Arnaud Lacombe
2010-08-17 2:19 ` Sam Ravnborg
2010-08-17 6:15 ` [RFC 0/2] Factor Kconfig's prefix and package name Arnaud Lacombe
2 siblings, 1 reply; 23+ messages in thread
From: Arnaud Lacombe @ 2010-08-17 1:12 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Roman Zippel, linux-kbuild, Michal Marek
Hi,
On Mon, Aug 16, 2010 at 8:36 AM, Sam Ravnborg <sam@ravnborg.org> wrote:
> 2) References to kernel + version in title in frontends
> - Use the (today unused) mainmenu entry to pick up the
> title.
> Consider following example:
>
> mainmenu "Linux kernel configuration v$KERNELVERSION"
>
> config KERNELVERSION
> string
> option env=KERNELVERSION
>
actually, this will need to be more tricky as there is not one, but 2 titles:
- "Linux Kernel Configuration" hardcoded in zconf.c
- "Linux Kernel v$KERNELVERSION Configuration" in {g,m,n,q}conf.c
The first prompt does not seem to be easily discardable, and I'm not
sure if it can be made dynamical, as we will need to make any
substitution only when everything else will have been parsed. In any
case I need to dig more in the code...
- Arnaud
ps: Sam, do you mind if I have a look at this ? the rephrasing and
prefix substitution will not take that much time.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC 0/2] Factor Kconfig's prefix and package name
2010-08-17 1:12 ` Arnaud Lacombe
@ 2010-08-17 2:19 ` Sam Ravnborg
2010-08-17 2:56 ` Arnaud Lacombe
0 siblings, 1 reply; 23+ messages in thread
From: Sam Ravnborg @ 2010-08-17 2:19 UTC (permalink / raw)
To: Arnaud Lacombe; +Cc: Roman Zippel, linux-kbuild, Michal Marek
On Mon, Aug 16, 2010 at 09:12:18PM -0400, Arnaud Lacombe wrote:
> Hi,
>
> On Mon, Aug 16, 2010 at 8:36 AM, Sam Ravnborg <sam@ravnborg.org> wrote:
> > 2) References to kernel + version in title in frontends
> > - Use the (today unused) mainmenu entry to pick up the
> > title.
> > Consider following example:
> >
> > mainmenu "Linux kernel configuration v$KERNELVERSION"
> >
> > config KERNELVERSION
> > string
> > option env=KERNELVERSION
> >
> actually, this will need to be more tricky as there is not one, but 2 titles:
>
> - "Linux Kernel Configuration" hardcoded in zconf.c
> - "Linux Kernel v$KERNELVERSION Configuration" in {g,m,n,q}conf.c
>
> The first prompt does not seem to be easily discardable, and I'm not
> sure if it can be made dynamical, as we will need to make any
> substitution only when everything else will have been parsed. In any
> case I need to dig more in the code...
If you look closer you will see that the prompt in zconf.y is not used
at all.
>
> - Arnaud
>
> ps: Sam, do you mind if I have a look at this ? the rephrasing and
> prefix substitution will not take that much time.
I would only be happy if you do so, any help is appreciated!
Sam
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC 0/2] Factor Kconfig's prefix and package name
2010-08-17 2:19 ` Sam Ravnborg
@ 2010-08-17 2:56 ` Arnaud Lacombe
2010-08-17 5:42 ` [PATCH] kbuild: implement the `mainmenu' directive Arnaud Lacombe
0 siblings, 1 reply; 23+ messages in thread
From: Arnaud Lacombe @ 2010-08-17 2:56 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Roman Zippel, linux-kbuild, Michal Marek
Hi,
On Mon, Aug 16, 2010 at 10:19 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
> If you look closer you will see that the prompt in zconf.y is not used
> at all.
>
yep, that part is done, now lets have a look to the symbol replacement stuff...
- Arnaud
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH] kbuild: implement the `mainmenu' directive
2010-08-17 2:56 ` Arnaud Lacombe
@ 2010-08-17 5:42 ` Arnaud Lacombe
2010-08-17 5:44 ` [PATCH] kbuild: delay rootmenu prompt initialization Arnaud Lacombe
` (3 more replies)
0 siblings, 4 replies; 23+ messages in thread
From: Arnaud Lacombe @ 2010-08-17 5:42 UTC (permalink / raw)
To: Sam Ravnborg, Michal Marek; +Cc: linux-kbuild, Arnaud Lacombe
note: the prompt is voluntarily still a bare `const char *'. It may need
to be represented in a more detailled way, say a `struct property'.
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
---
scripts/kconfig/lkc.h | 2 ++
| 23 +++++++++++++++++++++++
scripts/kconfig/zconf.y | 9 ++++++++-
3 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index bdf71bd..f00854f 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -94,6 +94,8 @@ static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out)
void kconfig_load(void);
/* menu.c */
+void mainmenu_set_prompt(char *);
+const char *mainmenu_get_prompt(void);
void _menu_init(void);
void menu_warn(struct menu *menu, const char *fmt, ...);
struct menu *menu_add_menu(void);
--git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 4fb5902..6aa219e 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -38,6 +38,29 @@ static void prop_warn(struct property *prop, const char *fmt, ...)
va_end(ap);
}
+static const char *mainmenu_prompt = NULL;
+
+void mainmenu_set_prompt(char *prompt)
+{
+ if (mainmenu_prompt != NULL)
+ fprintf(stderr, "%s:%d:warning: mainmenu redefined\n",
+ current_file->name, zconf_lineno());
+
+ if (isspace(*prompt)) {
+ fprintf(stderr, "%s:%d:warning: leading whitespace ignored\n",
+ current_file->name, zconf_lineno());
+ while (isspace(*prompt))
+ prompt++;
+ }
+
+ mainmenu_prompt = prompt;
+}
+
+const char *mainmenu_get_prompt(void)
+{
+ return mainmenu_prompt;
+}
+
void _menu_init(void)
{
current_entry = current_menu = &rootmenu;
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 23dfd3b..18c9a28 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -111,7 +111,7 @@ stmt_list:
| stmt_list common_stmt
| stmt_list choice_stmt
| stmt_list menu_stmt
- | stmt_list T_MAINMENU prompt nl
+ | stmt_list mainmenu_stmt
| 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 +342,13 @@ if_block:
| if_block choice_stmt
;
+/* mainmenu entry */
+
+mainmenu_stmt: T_MAINMENU prompt nl
+{
+ mainmenu_set_prompt($2);
+};
+
/* menu entry */
menu: T_MENU prompt T_EOL
--
1.7.2.30.gc37d7.dirty
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH] kbuild: delay rootmenu prompt initialization
2010-08-17 5:42 ` [PATCH] kbuild: implement the `mainmenu' directive Arnaud Lacombe
@ 2010-08-17 5:44 ` Arnaud Lacombe
2010-08-17 5:52 ` [PATCH] kbuild: implement the `mainmenu' directive Arnaud Lacombe
` (2 subsequent siblings)
3 siblings, 0 replies; 23+ messages in thread
From: Arnaud Lacombe @ 2010-08-17 5:44 UTC (permalink / raw)
To: Sam Ravnborg, Michal Marek; +Cc: linux-kbuild, Arnaud Lacombe
In order to be able to get the mainmenu prompt, the rootmenu's prompt need
to be deferred after zconfparse(), but still before menu_finalize().
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
---
scripts/kconfig/zconf.y | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 18c9a28..8788d77 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -486,7 +486,6 @@ void conf_parse(const char *name)
modules_sym = sym_lookup(NULL, 0);
modules_sym->type = S_BOOLEAN;
modules_sym->flags |= SYMBOL_AUTO;
- rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
#if YYDEBUG
if (getenv("ZCONF_DEBUG"))
@@ -501,6 +500,9 @@ void conf_parse(const char *name)
prop = prop_alloc(P_DEFAULT, modules_sym);
prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0));
}
+
+ rootmenu.prompt = menu_add_prompt(P_MENU, mainmenu_get_prompt(), NULL);
+
menu_finalize(&rootmenu);
for_all_symbols(i, sym) {
if (sym_check_deps(sym))
--
1.7.2.30.gc37d7.dirty
^ permalink raw reply related [flat|nested] 23+ messages in thread
* Re: [PATCH] kbuild: implement the `mainmenu' directive
2010-08-17 5:42 ` [PATCH] kbuild: implement the `mainmenu' directive Arnaud Lacombe
2010-08-17 5:44 ` [PATCH] kbuild: delay rootmenu prompt initialization Arnaud Lacombe
@ 2010-08-17 5:52 ` Arnaud Lacombe
2010-08-17 11:24 ` Michal Marek
2010-08-17 20:34 ` Sam Ravnborg
3 siblings, 0 replies; 23+ messages in thread
From: Arnaud Lacombe @ 2010-08-17 5:52 UTC (permalink / raw)
To: Sam Ravnborg, Michal Marek; +Cc: linux-kbuild, Arnaud Lacombe
Hi,
On Tue, Aug 17, 2010 at 1:42 AM, Arnaud Lacombe <lacombar@gmail.com> wrote:
> note: the prompt is voluntarily still a bare `const char *'. It may need
> to be represented in a more detailled way, say a `struct property'.
>
> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
>
> ---
> scripts/kconfig/lkc.h | 2 ++
> scripts/kconfig/menu.c | 23 +++++++++++++++++++++++
> scripts/kconfig/zconf.y | 9 ++++++++-
> 3 files changed, 33 insertions(+), 1 deletions(-)
>
this does not change any *_shipped files on purpose. You may have to
LKC_GENPARSER=1 for the change to be in effect.
- Arnaud
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC 0/2] Factor Kconfig's prefix and package name
2010-08-16 12:36 ` [RFC 0/2] Factor Kconfig's prefix and package name Sam Ravnborg
2010-08-16 21:42 ` Arnaud Lacombe
2010-08-17 1:12 ` Arnaud Lacombe
@ 2010-08-17 6:15 ` Arnaud Lacombe
2 siblings, 0 replies; 23+ messages in thread
From: Arnaud Lacombe @ 2010-08-17 6:15 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Roman Zippel, linux-kbuild, Michal Marek
Hi,
On Mon, Aug 16, 2010 at 8:36 AM, Sam Ravnborg <sam@ravnborg.org> wrote:
> 1) "Kernel" appear in diverse feedback texts
> - Re-phrase this to refer to the configuration.
> You know that you change the configuration
> of kernel/buildroot/ptxdist/whatever and
> there is no value of repeating this info in
> the feedback texts.
> - Re-phrasing have the benefit that once the
> translators pick up the new version the
> translated text is valied for all users.
> This would not be the case if you replace
> the project name.
>
will do tomorrow.
> 2) References to kernel + version in title in frontends
> - Use the (today unused) mainmenu entry to pick up the
> title.
> Consider following example:
>
> mainmenu "Linux kernel configuration v$KERNELVERSION"
>
> config KERNELVERSION
> string
> option env=KERNELVERSION
>
> With the above exampe we no longer hardcode
> the title and we use already existing features
> to get the version from the environment.
> The expansion of "$KERNELVERSION" to the value
> of the symbol is something I only see supported
> by "mainmenu".
> - This should also address the cases where we
> referer to the project name/version in the
> .config file (see confdata.c).
>
>
a first half has been posted here, the another one is written and has
been sent privately (for now, it still needs improvement).
> 3) Do not hardcode "CONFIG_"
> - I suggest to introduce a single define named "CONFIG_".
> All the places that hardcode the length should be
> replaced by strlen(CONFIG_).
> - The define should be conditional like this:
> #if !defined(CONFIG_)
> #define CONFIG_ "CONFIG_"
> #endif
> In this way other users can just use -DCONFIG_=BR2_ as they prefer.
>
will do tomorrow.
Beside that, the hardcoded string will need to be removed from
{g,m,n,q}conf.c, that should be trivial.
- Arnaud
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH] kbuild: implement the `mainmenu' directive
2010-08-17 5:42 ` [PATCH] kbuild: implement the `mainmenu' directive Arnaud Lacombe
2010-08-17 5:44 ` [PATCH] kbuild: delay rootmenu prompt initialization Arnaud Lacombe
2010-08-17 5:52 ` [PATCH] kbuild: implement the `mainmenu' directive Arnaud Lacombe
@ 2010-08-17 11:24 ` Michal Marek
2010-08-17 20:26 ` Sam Ravnborg
2010-08-17 20:34 ` Sam Ravnborg
3 siblings, 1 reply; 23+ messages in thread
From: Michal Marek @ 2010-08-17 11:24 UTC (permalink / raw)
To: Arnaud Lacombe; +Cc: Sam Ravnborg, linux-kbuild
On 17.8.2010 07:42, Arnaud Lacombe wrote:
> note: the prompt is voluntarily still a bare `const char *'. It may need
> to be represented in a more detailled way, say a `struct property'.
>
> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
>
> ---
> scripts/kconfig/lkc.h | 2 ++
> scripts/kconfig/menu.c | 23 +++++++++++++++++++++++
> scripts/kconfig/zconf.y | 9 ++++++++-
> 3 files changed, 33 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
> index bdf71bd..f00854f 100644
> --- a/scripts/kconfig/lkc.h
> +++ b/scripts/kconfig/lkc.h
> @@ -94,6 +94,8 @@ static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out)
> void kconfig_load(void);
>
> /* menu.c */
> +void mainmenu_set_prompt(char *);
> +const char *mainmenu_get_prompt(void);
> void _menu_init(void);
> void menu_warn(struct menu *menu, const char *fmt, ...);
> struct menu *menu_add_menu(void);
> diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
> index 4fb5902..6aa219e 100644
> --- a/scripts/kconfig/menu.c
> +++ b/scripts/kconfig/menu.c
> @@ -38,6 +38,29 @@ static void prop_warn(struct property *prop, const char *fmt, ...)
> va_end(ap);
> }
>
> +static const char *mainmenu_prompt = NULL;
Keep the "Linux Kernel Configuration" default here.
> +
> +void mainmenu_set_prompt(char *prompt)
> +{
> + if (mainmenu_prompt != NULL)
> + fprintf(stderr, "%s:%d:warning: mainmenu redefined\n",
> + current_file->name, zconf_lineno());
... and do not warn here.
> +
> + if (isspace(*prompt)) {
> + fprintf(stderr, "%s:%d:warning: leading whitespace ignored\n",
> + current_file->name, zconf_lineno());
> + while (isspace(*prompt))
> + prompt++;
> + }
The lexer already eats whitespace I think, so this might not be necessary.
Michal
> +
> + mainmenu_prompt = prompt;
> +}
> +
> +const char *mainmenu_get_prompt(void)
> +{
> + return mainmenu_prompt;
> +}
> +
> void _menu_init(void)
> {
> current_entry = current_menu = &rootmenu;
> diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
> index 23dfd3b..18c9a28 100644
> --- a/scripts/kconfig/zconf.y
> +++ b/scripts/kconfig/zconf.y
> @@ -111,7 +111,7 @@ stmt_list:
> | stmt_list common_stmt
> | stmt_list choice_stmt
> | stmt_list menu_stmt
> - | stmt_list T_MAINMENU prompt nl
> + | stmt_list mainmenu_stmt
> | 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 +342,13 @@ if_block:
> | if_block choice_stmt
> ;
>
> +/* mainmenu entry */
> +
> +mainmenu_stmt: T_MAINMENU prompt nl
> +{
> + mainmenu_set_prompt($2);
> +};
> +
> /* menu entry */
>
> menu: T_MENU prompt T_EOL
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH] kbuild: implement the `mainmenu' directive
2010-08-17 11:24 ` Michal Marek
@ 2010-08-17 20:26 ` Sam Ravnborg
2010-08-18 2:28 ` Arnaud Lacombe
0 siblings, 1 reply; 23+ messages in thread
From: Sam Ravnborg @ 2010-08-17 20:26 UTC (permalink / raw)
To: Michal Marek; +Cc: Arnaud Lacombe, linux-kbuild
On Tue, Aug 17, 2010 at 01:24:23PM +0200, Michal Marek wrote:
> On 17.8.2010 07:42, Arnaud Lacombe wrote:
> > note: the prompt is voluntarily still a bare `const char *'. It may need
> > to be represented in a more detailled way, say a `struct property'.
> >
> > Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
> >
> > ---
> > scripts/kconfig/lkc.h | 2 ++
> > scripts/kconfig/menu.c | 23 +++++++++++++++++++++++
> > scripts/kconfig/zconf.y | 9 ++++++++-
> > 3 files changed, 33 insertions(+), 1 deletions(-)
> >
> > diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
> > index bdf71bd..f00854f 100644
> > --- a/scripts/kconfig/lkc.h
> > +++ b/scripts/kconfig/lkc.h
> > @@ -94,6 +94,8 @@ static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out)
> > void kconfig_load(void);
> >
> > /* menu.c */
> > +void mainmenu_set_prompt(char *);
> > +const char *mainmenu_get_prompt(void);
> > void _menu_init(void);
> > void menu_warn(struct menu *menu, const char *fmt, ...);
> > struct menu *menu_add_menu(void);
> > diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
> > index 4fb5902..6aa219e 100644
> > --- a/scripts/kconfig/menu.c
> > +++ b/scripts/kconfig/menu.c
> > @@ -38,6 +38,29 @@ static void prop_warn(struct property *prop, const char *fmt, ...)
> > va_end(ap);
> > }
> >
> > +static const char *mainmenu_prompt = NULL;
>
> Keep the "Linux Kernel Configuration" default here.
Or alternative named it "mainmenu" - to give user a hint what this is about.
>
> > +
> > +void mainmenu_set_prompt(char *prompt)
> > +{
> > + if (mainmenu_prompt != NULL)
> > + fprintf(stderr, "%s:%d:warning: mainmenu redefined\n",
> > + current_file->name, zconf_lineno());
>
> ... and do not warn here.
>
> > +
> > + if (isspace(*prompt)) {
> > + fprintf(stderr, "%s:%d:warning: leading whitespace ignored\n",
> > + current_file->name, zconf_lineno());
> > + while (isspace(*prompt))
> > + prompt++;
> > + }
>
> The lexer already eats whitespace I think, so this might not be necessary.
menu_add_prop() does something similar so I think not.
But I did not check.
Sam
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH] kbuild: implement the `mainmenu' directive
2010-08-17 5:42 ` [PATCH] kbuild: implement the `mainmenu' directive Arnaud Lacombe
` (2 preceding siblings ...)
2010-08-17 11:24 ` Michal Marek
@ 2010-08-17 20:34 ` Sam Ravnborg
2010-08-17 20:44 ` Arnaud Lacombe
3 siblings, 1 reply; 23+ messages in thread
From: Sam Ravnborg @ 2010-08-17 20:34 UTC (permalink / raw)
To: Arnaud Lacombe; +Cc: Michal Marek, linux-kbuild
On Tue, Aug 17, 2010 at 01:42:05AM -0400, Arnaud Lacombe wrote:
> note: the prompt is voluntarily still a bare `const char *'. It may need
> to be represented in a more detailled way, say a `struct property'.
I actually attempted to go the "struct property" way.
This looks much simpler and I like how straight forward it is.
>
> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
>
> ---
> scripts/kconfig/lkc.h | 2 ++
> scripts/kconfig/menu.c | 23 +++++++++++++++++++++++
> scripts/kconfig/zconf.y | 9 ++++++++-
> 3 files changed, 33 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
> index bdf71bd..f00854f 100644
> --- a/scripts/kconfig/lkc.h
> +++ b/scripts/kconfig/lkc.h
> @@ -94,6 +94,8 @@ static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out)
> void kconfig_load(void);
>
> /* menu.c */
> +void mainmenu_set_prompt(char *);
> +const char *mainmenu_get_prompt(void);
> void _menu_init(void);
> void menu_warn(struct menu *menu, const char *fmt, ...);
> struct menu *menu_add_menu(void);
> diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
> index 4fb5902..6aa219e 100644
> --- a/scripts/kconfig/menu.c
> +++ b/scripts/kconfig/menu.c
> @@ -38,6 +38,29 @@ static void prop_warn(struct property *prop, const char *fmt, ...)
> va_end(ap);
> }
>
> +static const char *mainmenu_prompt = NULL;
> +
> +void mainmenu_set_prompt(char *prompt)
> +{
> + if (mainmenu_prompt != NULL)
> + fprintf(stderr, "%s:%d:warning: mainmenu redefined\n",
> + current_file->name, zconf_lineno());
> +
> + if (isspace(*prompt)) {
> + fprintf(stderr, "%s:%d:warning: leading whitespace ignored\n",
> + current_file->name, zconf_lineno());
> + while (isspace(*prompt))
> + prompt++;
Any particular reason not to use menu_warn() ?
> --- a/scripts/kconfig/zconf.y
> +++ b/scripts/kconfig/zconf.y
> @@ -111,7 +111,7 @@ stmt_list:
> | stmt_list common_stmt
> | stmt_list choice_stmt
> | stmt_list menu_stmt
> - | stmt_list T_MAINMENU prompt nl
> + | stmt_list mainmenu_stmt
> | 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 +342,13 @@ if_block:
> | if_block choice_stmt
> ;
>
> +/* mainmenu entry */
> +
> +mainmenu_stmt: T_MAINMENU prompt nl
> +{
> + mainmenu_set_prompt($2);
> +};
> +
> /* menu entry */
>
> menu: T_MENU prompt T_EOL
When you submit the final patch then please divide it in two.
One patch that contains the zconf.y changes (like you do here),
and then a subsequent patch that updates the relevant _shipped files.
This makes review so much easier.
Sam
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH] kbuild: implement the `mainmenu' directive
2010-08-17 20:34 ` Sam Ravnborg
@ 2010-08-17 20:44 ` Arnaud Lacombe
2010-08-17 20:51 ` Sam Ravnborg
0 siblings, 1 reply; 23+ messages in thread
From: Arnaud Lacombe @ 2010-08-17 20:44 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Michal Marek, linux-kbuild
Hi,
On Tue, Aug 17, 2010 at 4:34 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
> Any particular reason not to use menu_warn() ?
>
I would need a valid `struct menu *' ? same argument for prop_warn() :)
> When you submit the final patch then please divide it in two.
> One patch that contains the zconf.y changes (like you do here),
> and then a subsequent patch that updates the relevant _shipped files.
> This makes review so much easier.
>
It seemed you were saying you had a patch, quoting what you said in
the beginning:
> I actually attempted to go the "struct property" way.
> This looks much simpler and I like how straight forward it is.
>
or did I wrongly understood ?
- Arnaud
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH] kbuild: implement the `mainmenu' directive
2010-08-17 20:44 ` Arnaud Lacombe
@ 2010-08-17 20:51 ` Sam Ravnborg
0 siblings, 0 replies; 23+ messages in thread
From: Sam Ravnborg @ 2010-08-17 20:51 UTC (permalink / raw)
To: Arnaud Lacombe; +Cc: Michal Marek, linux-kbuild
On Tue, Aug 17, 2010 at 04:44:00PM -0400, Arnaud Lacombe wrote:
> Hi,
>
> On Tue, Aug 17, 2010 at 4:34 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
> > Any particular reason not to use menu_warn() ?
> >
> I would need a valid `struct menu *' ? same argument for prop_warn() :)
>
> > When you submit the final patch then please divide it in two.
> > One patch that contains the zconf.y changes (like you do here),
> > and then a subsequent patch that updates the relevant _shipped files.
> > This makes review so much easier.
> >
> It seemed you were saying you had a patch, quoting what you said in
> the beginning:
>
> > I actually attempted to go the "struct property" way.
> > This looks much simpler and I like how straight forward it is.
> >
>
> or did I wrongly understood ?
I had a patch but I lost it (read: git reset --hard in the wrong tree).
It would be simple to redo.
Sam
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH] kbuild: implement the `mainmenu' directive
2010-08-17 20:26 ` Sam Ravnborg
@ 2010-08-18 2:28 ` Arnaud Lacombe
0 siblings, 0 replies; 23+ messages in thread
From: Arnaud Lacombe @ 2010-08-18 2:28 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Michal Marek, linux-kbuild
Hi,
On Tue, Aug 17, 2010 at 4:26 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
> On Tue, Aug 17, 2010 at 01:24:23PM +0200, Michal Marek wrote:
>> On 17.8.2010 07:42, Arnaud Lacombe wrote:
>> > + if (isspace(*prompt)) {
>> > + fprintf(stderr, "%s:%d:warning: leading whitespace ignored\n",
>> > + current_file->name, zconf_lineno());
>> > + while (isspace(*prompt))
>> > + prompt++;
>> > + }
>>
>> The lexer already eats whitespace I think, so this might not be necessary.
>
> menu_add_prop() does something similar so I think not.
> But I did not check.
>
The leading whitespace removal have been added explicitly by Roman Zippel:
commit f001f7f89689d3226678ab3986f3a486f54aa069
Author: Roman Zippel <zippel@linux-m68k.org>
Date: Thu Jun 8 22:12:48 2006 -0700
kconfig: warn about leading whitespace for menu prompts
Kconfig does its own indentation of menu prompts, so warn about and ignore
leading whitespace. Remove also a few unnecessary newlines after other
warning prints.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Not sure if that would still apply for the mainmenu.
- Arnaud
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2010-08-18 2:28 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-16 4:54 [RFC 0/2] Factor Kconfig's prefix and package name Arnaud Lacombe
2010-08-16 4:54 ` [RFC 1/2] kbuild: genericizes " Arnaud Lacombe
2010-08-16 11:57 ` Michal Marek
2010-08-16 12:23 ` Michal Marek
2010-08-16 17:26 ` Sam Ravnborg
2010-08-16 20:05 ` Michal Marek
2010-08-16 4:54 ` [RFC 2/2] kbuild: genericizes kbuild's config prefix Arnaud Lacombe
2010-08-16 12:36 ` [RFC 0/2] Factor Kconfig's prefix and package name Sam Ravnborg
2010-08-16 21:42 ` Arnaud Lacombe
2010-08-16 21:50 ` Sam Ravnborg
2010-08-17 1:12 ` Arnaud Lacombe
2010-08-17 2:19 ` Sam Ravnborg
2010-08-17 2:56 ` Arnaud Lacombe
2010-08-17 5:42 ` [PATCH] kbuild: implement the `mainmenu' directive Arnaud Lacombe
2010-08-17 5:44 ` [PATCH] kbuild: delay rootmenu prompt initialization Arnaud Lacombe
2010-08-17 5:52 ` [PATCH] kbuild: implement the `mainmenu' directive Arnaud Lacombe
2010-08-17 11:24 ` Michal Marek
2010-08-17 20:26 ` Sam Ravnborg
2010-08-18 2:28 ` Arnaud Lacombe
2010-08-17 20:34 ` Sam Ravnborg
2010-08-17 20:44 ` Arnaud Lacombe
2010-08-17 20:51 ` Sam Ravnborg
2010-08-17 6:15 ` [RFC 0/2] Factor Kconfig's prefix and package name Arnaud Lacombe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox