---
Makefile | 7 +++
README.buildroot2 | 22 ++++++++++
- conf.c | 13 ++----
+ conf.c | 17 ++++----
confdata.c | 101 ++++++++++++++++++++++++++------------------------
expr.c | 42 ++++++++++----------
gconf.c | 4 -
util.c | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++-
zconf.tab.c_shipped | 2
zconf.y | 2
- 12 files changed, 241 insertions(+), 103 deletions(-)
+ 12 files changed, 244 insertions(+), 104 deletions(-)
Index: config/Makefile
===================================================================
return 1;
}
}
-@@ -600,16 +599,16 @@
+@@ -600,18 +599,22 @@
* 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 Buildroot configuration.\n\n"));
exit(1);
}
++ if (conf_write_autoconf()) {
++ fprintf(stderr, _("\n*** Error during update of the Buildroot configuration.\n\n"));
++ return 1;
++ }
}
+ return 0;
+ }
Index: config/confdata.c
===================================================================
--- config.orig/confdata.c
static void conf_warning(const char *fmt, ...)
{
-@@ -36,16 +37,16 @@
+@@ -36,16 +37,14 @@
const char *conf_get_configname(void)
{
const char *conf_get_autoconfig_name(void)
{
- char *name = getenv("KCONFIG_AUTOCONFIG");
-+ char *name = getenv("BUILDROOT_AUTOCONFIG");
-
+-
- return name ? name : "include/config/auto.conf";
-+ return name ? name : "$(BR2_DEPENDS_DIR)/config/auto.conf";
++ return getenv("KCONFIG_AUTOCONFIG");
}
static char *conf_expand_value(const char *in)
-@@ -219,22 +220,22 @@
+@@ -219,22 +218,22 @@
sym = NULL;
switch (line[0]) {
case '#':
if (sym->type == S_UNKNOWN)
sym->type = S_BOOLEAN;
}
-@@ -251,12 +252,8 @@
+@@ -251,12 +250,8 @@
;
}
break;
if (!p)
continue;
*p++ = 0;
-@@ -267,13 +264,13 @@
+@@ -267,13 +262,13 @@
*p2 = 0;
}
if (def == S_DEF_USER) {
if (sym->type == S_UNKNOWN)
sym->type = S_OTHER;
}
-@@ -443,7 +440,7 @@
+@@ -443,7 +438,7 @@
if (!out)
return 1;
sym_calc_value(sym);
time(&now);
env = getenv("KCONFIG_NOTIMESTAMP");
-@@ -452,10 +449,8 @@
+@@ -452,10 +447,8 @@
fprintf(out, _("#\n"
"# Automatically generated make config: don't edit\n"
use_timestamp ? "# " : "",
use_timestamp ? ctime(&now) : "");
-@@ -489,19 +484,19 @@
+@@ -489,19 +482,19 @@
case S_TRISTATE:
switch (sym_get_tristate_value(sym)) {
case no:
while (1) {
l = strcspn(str, "\"\\");
if (l) {
-@@ -517,12 +512,12 @@
+@@ -517,12 +510,12 @@
case S_HEX:
str = sym_get_string_value(sym);
if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
break;
}
}
-@@ -564,6 +559,7 @@
+@@ -564,6 +557,7 @@
{
const char *name;
char path[128];
char *s, *d, c;
struct symbol *sym;
struct stat sb;
-@@ -572,8 +568,20 @@
+@@ -572,8 +566,20 @@
name = conf_get_autoconfig_name();
conf_read_simple(name, S_DEF_AUTO);
res = 0;
for_all_symbols(i, sym) {
-@@ -666,9 +674,11 @@
+@@ -666,9 +672,11 @@
close(fd);
}
out:
return res;
}
-@@ -683,7 +693,7 @@
+@@ -683,7 +691,7 @@
sym_clear_all_valid();
if (conf_split_config())
return 1;
-@@ -698,22 +708,19 @@
+@@ -698,22 +706,19 @@
return 1;
}
for_all_symbols(i, sym) {
sym_calc_value(sym);
-@@ -726,19 +733,19 @@
+@@ -726,19 +731,19 @@
case no:
break;
case mod:
while (1) {
l = strcspn(str, "\"\\");
if (l) {
-@@ -758,14 +765,14 @@
+@@ -758,14 +763,14 @@
case S_HEX:
str = sym_get_string_value(sym);
if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {