- pull kbuild from 2.6.22.7. This should fix the ncurses detection for dylib et al
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sun, 23 Sep 2007 14:06:59 +0000 (14:06 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sun, 23 Sep 2007 14:06:59 +0000 (14:06 -0000)
18 files changed:
package/config/Makefile.kconfig
package/config/README.buildroot2
package/config/conf.c
package/config/kconfig-to-buildroot2.patch
package/config/lex.zconf.c_shipped
package/config/lkc.h
package/config/lxdialog/check-lxdialog.sh
package/config/lxdialog/dialog.h
package/config/lxdialog/util.c
package/config/mconf.c
package/config/menu.c
package/config/qconf.cc
package/config/qconf.h
package/config/symbol.c
package/config/util.c
package/config/zconf.l
package/config/zconf.tab.c_shipped
package/config/zconf.y

index 016397f669eb6fffcbbad858932c2148b2c9d8bb..3288a2c604735fe17451802d2de030e396791246 100644 (file)
@@ -143,6 +143,7 @@ endif
 
 clean-files    := lkc_defs.h qconf.moc .tmp_qtcheck \
                   .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c
+clean-files     += mconf qconf gconf
 
 # Needed for systems without gettext
 KBUILD_HAVE_NLS := $(shell \
index 4bf50ace9be4723623749742e38b567f798a88d7..776d4fad8a3f9d9a01dad7b4706d8d75773ad4dc 100644 (file)
@@ -1,4 +1,4 @@
-This is a copy of the kconfig code in the kernel (currently 2.6.21.5) tweaked to
+This is a copy of the kconfig code in the kernel (currently 2.6.22.7) tweaked to
 suit Buildroot.
 
 To update:
@@ -6,7 +6,7 @@ To update:
        cd package/config.new
        cp /usr/src/linux/Documentation/kbuild/kconfig-language.txt .
        mv Makefile Makefile.kconfig
-       patch -p1 < ../config/kconfig-to-buildroot.patch
+       patch -p1 < ../config/kconfig-to-buildroot2.patch
        cp ../config/README.buildroot2 .
        cp ../config/foo.h .
        cp ../config/Makefile .
index 9900e90ea00a3891b4b608f05740bce9cd695adc..841635ea9f30b544034e7ebe989b2c67cbbdbcfc 100644 (file)
@@ -558,6 +558,7 @@ int main(int ac, char **av)
                if (stat(".config", &tmpstat)) {
                        printf(_("***\n"
                                "*** You have not yet configured Buildroot!\n"
+                               "*** (missing .config file)\n"
                                "***\n"
                                "*** Please run some configurator (e.g. \"make oldconfig\" or\n"
                                "*** \"make menuconfig\" or \"make config\").\n"
index 5eed65af6be5a1a135cd015f17afb226fc1076b7..7e478816e08d7353e5560242fdf0e74df9bf0217 100644 (file)
@@ -1,5 +1,6 @@
---- kconfig/conf.c     2007-06-11 20:37:06.000000000 +0200
-+++ Buildroot/conf.c   2007-06-28 13:10:46.000000000 +0200
+diff -rdup kernel-config/conf.c config/conf.c
+--- kernel-config/conf.c       2007-09-22 00:38:23.000000000 +0200
++++ config/conf.c      2007-09-23 15:35:12.000000000 +0200
 @@ -542,7 +542,7 @@ int main(int ac, char **av)
                exit(1);
        }
        switch (input_mode) {
        case set_default:
                if (!defconfig_file)
-@@ -557,10 +557,10 @@ int main(int ac, char **av)
+@@ -557,11 +557,11 @@ int main(int ac, char **av)
        case ask_silent:
                if (stat(".config", &tmpstat)) {
                        printf(_("***\n"
 -                              "*** You have not yet configured your kernel!\n"
+-                              "*** (missing kernel .config file)\n"
 +                              "*** You have not yet configured Buildroot!\n"
++                              "*** (missing .config file)\n"
                                "***\n"
                                "*** Please run some configurator (e.g. \"make oldconfig\" or\n"
 -                              "*** \"make menuconfig\" or \"make xconfig\").\n"
@@ -22,7 +25,7 @@
                                "***\n"));
                        exit(1);
                }
-@@ -603,7 +603,7 @@ int main(int ac, char **av)
+@@ -604,7 +604,7 @@ int main(int ac, char **av)
        } else if (conf_get_changed()) {
                name = getenv("KCONFIG_NOSILENTUPDATE");
                if (name && *name) {
@@ -31,7 +34,7 @@
                        return 1;
                }
        } else
-@@ -614,12 +614,12 @@ int main(int ac, char **av)
+@@ -615,12 +615,12 @@ int main(int ac, char **av)
                check_conf(&rootmenu);
        } while (conf_cnt);
        if (conf_write(NULL)) {
                return 1;
        }
  
---- kconfig/confdata.c 2007-06-11 20:37:06.000000000 +0200
-+++ Buildroot/confdata.c       2007-06-28 13:06:23.000000000 +0200
-@@ -21,7 +21,7 @@ static void conf_warning(const char *fmt
+diff -rdup kernel-config/confdata.c config/confdata.c
+--- kernel-config/confdata.c   2007-09-22 00:38:23.000000000 +0200
++++ config/confdata.c  2007-09-23 15:33:26.000000000 +0200
+@@ -11,6 +11,7 @@
+ #include <string.h>
+ #include <time.h>
+ #include <unistd.h>
++#include <libgen.h>
+ #define LKC_DIRECT_LINK
+ #include "lkc.h"
+@@ -21,7 +22,7 @@ static void conf_warning(const char *fmt
  static const char *conf_filename;
  static int conf_lineno, conf_warnings, conf_unsaved;
  
 -const char conf_defname[] = "arch/$ARCH/defconfig";
-+const char conf_defname[] = "extra/Configs/defconfigs/$ARCH";
++const char conf_defname[] = ".defconfig";
  
  static void conf_warning(const char *fmt, ...)
  {
-@@ -150,22 +150,22 @@ load:
+@@ -150,22 +151,22 @@ load:
                sym = NULL;
                switch (line[0]) {
                case '#':
@@ -86,7 +98,7 @@
                                if (sym->type == S_UNKNOWN)
                                        sym->type = S_BOOLEAN;
                        }
-@@ -183,12 +183,8 @@ load:
+@@ -183,12 +184,8 @@ load:
                                ;
                        }
                        break;
                        if (!p)
                                continue;
                        *p++ = 0;
-@@ -199,13 +195,13 @@ load:
+@@ -199,13 +196,13 @@ load:
                                        *p2 = 0;
                        }
                        if (def == S_DEF_USER) {
                                if (sym->type == S_UNKNOWN)
                                        sym->type = S_OTHER;
                        }
-@@ -416,7 +412,7 @@ int conf_write(const char *name)
+@@ -416,7 +413,7 @@ int conf_write(const char *name)
        if (!out)
                return 1;
  
        sym_calc_value(sym);
        time(&now);
        env = getenv("KCONFIG_NOTIMESTAMP");
-@@ -425,10 +421,8 @@ int conf_write(const char *name)
+@@ -425,10 +422,8 @@ int conf_write(const char *name)
  
        fprintf(out, _("#\n"
                       "# Automatically generated make config: don't edit\n"
                     use_timestamp ? "# " : "",
                     use_timestamp ? ctime(&now) : "");
  
-@@ -462,19 +456,19 @@ int conf_write(const char *name)
+@@ -462,19 +457,19 @@ int conf_write(const char *name)
                        case S_TRISTATE:
                                switch (sym_get_tristate_value(sym)) {
                                case no:
                                while (1) {
                                        l = strcspn(str, "\"\\");
                                        if (l) {
-@@ -490,12 +484,12 @@ int conf_write(const char *name)
+@@ -490,12 +485,12 @@ int conf_write(const char *name)
                        case S_HEX:
                                str = sym_get_string_value(sym);
                                if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
                                break;
                        }
                }
-@@ -672,22 +668,19 @@ int conf_write_autoconf(void)
+@@ -535,7 +530,7 @@ int conf_write(const char *name)
+ int conf_split_config(void)
+ {
+-      char *name, path[128];
++      char *name, path[128], *opwd, *dir, *_name;
+       char *s, *d, c;
+       struct symbol *sym;
+       struct stat sb;
+@@ -546,8 +541,20 @@ int conf_split_config(void)
+               name = "include/config/auto.conf";
+       conf_read_simple(name, S_DEF_AUTO);
+-      if (chdir("include/config"))
++      opwd = malloc(256);
++      _name = strdup(name);
++      if (opwd == NULL || _name == NULL)
+               return 1;
++      opwd = getcwd(opwd, 256);
++      dir = dirname(_name);
++      if (dir == NULL) {
++              res = 1;
++              goto err;
++      }
++      if (chdir(dir)) {
++              res = 1;
++              goto err;
++      }
+       res = 0;
+       for_all_symbols(i, sym) {
+@@ -640,9 +647,11 @@ int conf_split_config(void)
+               close(fd);
+       }
+ out:
+-      if (chdir("../.."))
+-              return 1;
+-
++      if (chdir(opwd))
++              res = 1;
++err:
++      free(opwd);
++      free(_name);
+       return res;
+ }
+@@ -657,7 +666,7 @@ int conf_write_autoconf(void)
+       sym_clear_all_valid();
+-      file_write_dep("include/config/auto.conf.cmd");
++      file_write_dep(".config.cmd");
+       if (conf_split_config())
+               return 1;
+@@ -672,22 +681,19 @@ int conf_write_autoconf(void)
                return 1;
        }
  
  
        for_all_symbols(i, sym) {
                sym_calc_value(sym);
-@@ -700,19 +693,19 @@ int conf_write_autoconf(void)
+@@ -700,19 +706,19 @@ int conf_write_autoconf(void)
                        case no:
                                break;
                        case mod:
                        while (1) {
                                l = strcspn(str, "\"\\");
                                if (l) {
-@@ -732,14 +725,14 @@ int conf_write_autoconf(void)
+@@ -732,14 +738,14 @@ int conf_write_autoconf(void)
                case S_HEX:
                        str = sym_get_string_value(sym);
                        if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
                        break;
                default:
                        break;
---- kconfig/expr.c     2007-06-11 20:37:06.000000000 +0200
-+++ Buildroot/expr.c   2007-06-28 13:24:38.000000000 +0200
+diff -rdup kernel-config/expr.c config/expr.c
+--- kernel-config/expr.c       2007-09-22 00:38:23.000000000 +0200
++++ config/expr.c      2007-09-23 15:33:26.000000000 +0200
 @@ -331,7 +331,7 @@ struct expr *expr_trans_bool(struct expr
                e->right.expr = expr_trans_bool(e->right.expr);
                break;
                                tmp = e->left.expr;
                                free(e);
                                e = tmp;
---- kconfig/expr.h     2007-06-11 20:37:06.000000000 +0200
-+++ Buildroot/expr.h   2007-06-28 13:08:57.000000000 +0200
+diff -rdup kernel-config/expr.h config/expr.h
+--- kernel-config/expr.h       2007-09-22 00:38:23.000000000 +0200
++++ config/expr.h      2007-09-23 15:33:26.000000000 +0200
 @@ -65,7 +65,7 @@ enum symbol_type {
  
  enum {
        struct file *file;
        int lineno;
        void *data;
---- kconfig/gconf.c    2007-06-11 20:37:06.000000000 +0200
-+++ Buildroot/gconf.c  2007-06-28 12:15:29.000000000 +0200
+diff -rdup kernel-config/gconf.c config/gconf.c
+--- kernel-config/gconf.c      2007-09-22 00:38:23.000000000 +0200
++++ config/gconf.c     2007-09-23 15:33:26.000000000 +0200
 @@ -271,8 +271,8 @@ void init_main_window(const gchar * glad
                                          /*"style", PANGO_STYLE_OBLIQUE, */
                                          NULL);
        gtk_window_set_title(GTK_WINDOW(main_wnd), title);
  
        gtk_widget_show(main_wnd);
---- kconfig/gconf.glade        2007-06-11 20:37:06.000000000 +0200
-+++ Buildroot/gconf.glade      2007-06-28 12:17:40.000000000 +0200
+diff -rdup kernel-config/gconf.glade config/gconf.glade
+--- kernel-config/gconf.glade  2007-09-22 00:38:23.000000000 +0200
++++ config/gconf.glade 2007-09-23 15:33:26.000000000 +0200
 @@ -5,7 +5,7 @@
  
  <widget class="GtkWindow" id="window1">
    <property name="type">GTK_WINDOW_TOPLEVEL</property>
    <property name="window_position">GTK_WIN_POS_NONE</property>
    <property name="modal">False</property>
---- kconfig/mconf.c    2007-06-11 20:37:06.000000000 +0200
-+++ Buildroot/mconf.c  2007-06-28 12:15:29.000000000 +0200
-@@ -30,20 +30,18 @@ static char menu_backtitle[128];
+diff -rdup kernel-config/kconfig-to-buildroot2.patch config/kconfig-to-buildroot2.patch
+--- kernel-config/kconfig-to-buildroot2.patch  2007-09-23 15:33:01.000000000 +0200
++++ config/kconfig-to-buildroot2.patch 2007-09-23 15:39:23.000000000 +0200
+@@ -1,5 +1,6 @@
+---- kconfig/conf.c    2007-06-11 20:37:06.000000000 +0200
+-+++ Buildroot/conf.c  2007-06-28 13:10:46.000000000 +0200
++diff -rdup kernel-config/conf.c config/conf.c
++--- kernel-config/conf.c      2007-09-22 00:38:23.000000000 +0200
+++++ config/conf.c     2007-09-23 15:35:12.000000000 +0200
+ @@ -542,7 +542,7 @@ int main(int ac, char **av)
+               exit(1);
+       }
+@@ -9,12 +10,14 @@
+       switch (input_mode) {
+       case set_default:
+               if (!defconfig_file)
+-@@ -557,10 +557,10 @@ int main(int ac, char **av)
++@@ -557,11 +557,11 @@ int main(int ac, char **av)
+       case ask_silent:
+               if (stat(".config", &tmpstat)) {
+                       printf(_("***\n"
+ -                             "*** You have not yet configured your kernel!\n"
+-+                             "*** You have not yet configured Buildroot!\n"
++-                             "*** (missing kernel .config file)\n"
+++                             "*** You have not yet configured buildroot!\n"
+++                             "*** (missing .config file)\n"
+                               "***\n"
+                               "*** Please run some configurator (e.g. \"make oldconfig\" or\n"
+ -                             "*** \"make menuconfig\" or \"make xconfig\").\n"
+@@ -22,7 +25,7 @@
+                               "***\n"));
+                       exit(1);
+               }
+-@@ -603,7 +603,7 @@ int main(int ac, char **av)
++@@ -604,7 +604,7 @@ int main(int ac, char **av)
+       } else if (conf_get_changed()) {
+               name = getenv("KCONFIG_NOSILENTUPDATE");
+               if (name && *name) {
+@@ -31,7 +34,7 @@
+                       return 1;
+               }
+       } else
+-@@ -614,12 +614,12 @@ int main(int ac, char **av)
++@@ -615,12 +615,12 @@ int main(int ac, char **av)
+               check_conf(&rootmenu);
+       } while (conf_cnt);
+       if (conf_write(NULL)) {
+@@ -47,18 +50,27 @@
+               return 1;
+       }
+  
+---- kconfig/confdata.c        2007-06-11 20:37:06.000000000 +0200
+-+++ Buildroot/confdata.c      2007-06-28 13:06:23.000000000 +0200
+-@@ -21,7 +21,7 @@ static void conf_warning(const char *fmt
++diff -rdup kernel-config/confdata.c config/confdata.c
++--- kernel-config/confdata.c  2007-09-22 00:38:23.000000000 +0200
+++++ config/confdata.c 2007-09-23 15:33:26.000000000 +0200
++@@ -11,6 +11,7 @@
++ #include <string.h>
++ #include <time.h>
++ #include <unistd.h>
+++#include <libgen.h>
++ 
++ #define LKC_DIRECT_LINK
++ #include "lkc.h"
++@@ -21,7 +22,7 @@ static void conf_warning(const char *fmt
+  static const char *conf_filename;
+  static int conf_lineno, conf_warnings, conf_unsaved;
+  
+ -const char conf_defname[] = "arch/$ARCH/defconfig";
+-+const char conf_defname[] = "extra/Configs/defconfigs/$ARCH";
+++const char conf_defname[] = ".defconfig";
+  
+  static void conf_warning(const char *fmt, ...)
+  {
+-@@ -150,22 +150,22 @@ load:
++@@ -150,22 +151,22 @@ load:
+               sym = NULL;
+               switch (line[0]) {
+               case '#':
+@@ -86,7 +98,7 @@
+                               if (sym->type == S_UNKNOWN)
+                                       sym->type = S_BOOLEAN;
+                       }
+-@@ -183,12 +183,8 @@ load:
++@@ -183,12 +184,8 @@ load:
+                               ;
+                       }
+                       break;
+@@ -101,7 +113,7 @@
+                       if (!p)
+                               continue;
+                       *p++ = 0;
+-@@ -199,13 +195,13 @@ load:
++@@ -199,13 +196,13 @@ load:
+                                       *p2 = 0;
+                       }
+                       if (def == S_DEF_USER) {
+@@ -118,7 +130,7 @@
+                               if (sym->type == S_UNKNOWN)
+                                       sym->type = S_OTHER;
+                       }
+-@@ -416,7 +412,7 @@ int conf_write(const char *name)
++@@ -416,7 +413,7 @@ int conf_write(const char *name)
+       if (!out)
+               return 1;
+  
+@@ -127,7 +139,7 @@
+       sym_calc_value(sym);
+       time(&now);
+       env = getenv("KCONFIG_NOTIMESTAMP");
+-@@ -425,10 +421,8 @@ int conf_write(const char *name)
++@@ -425,10 +422,8 @@ int conf_write(const char *name)
+  
+       fprintf(out, _("#\n"
+                      "# Automatically generated make config: don't edit\n"
+@@ -138,7 +150,7 @@
+                    use_timestamp ? "# " : "",
+                    use_timestamp ? ctime(&now) : "");
+  
+-@@ -462,19 +456,19 @@ int conf_write(const char *name)
++@@ -462,19 +457,19 @@ int conf_write(const char *name)
+                       case S_TRISTATE:
+                               switch (sym_get_tristate_value(sym)) {
+                               case no:
+@@ -162,7 +174,7 @@
+                               while (1) {
+                                       l = strcspn(str, "\"\\");
+                                       if (l) {
+-@@ -490,12 +484,12 @@ int conf_write(const char *name)
++@@ -490,12 +485,12 @@ int conf_write(const char *name)
+                       case S_HEX:
+                               str = sym_get_string_value(sym);
+                               if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
+@@ -177,7 +189,62 @@
+                               break;
+                       }
+               }
+-@@ -672,22 +668,19 @@ int conf_write_autoconf(void)
++@@ -535,7 +530,7 @@ int conf_write(const char *name)
++ 
++ int conf_split_config(void)
++ {
++-     char *name, path[128];
+++     char *name, path[128], *opwd, *dir, *_name;
++      char *s, *d, c;
++      struct symbol *sym;
++      struct stat sb;
++@@ -546,8 +541,20 @@ int conf_split_config(void)
++              name = "include/config/auto.conf";
++      conf_read_simple(name, S_DEF_AUTO);
++ 
++-     if (chdir("include/config"))
+++     opwd = malloc(256);
+++     _name = strdup(name);
+++     if (opwd == NULL || _name == NULL)
++              return 1;
+++     opwd = getcwd(opwd, 256);
+++     dir = dirname(_name);
+++     if (dir == NULL) {
+++             res = 1;
+++             goto err;
+++     }
+++     if (chdir(dir)) {
+++             res = 1;
+++             goto err;
+++     }
++ 
++      res = 0;
++      for_all_symbols(i, sym) {
++@@ -640,9 +647,11 @@ int conf_split_config(void)
++              close(fd);
++      }
++ out:
++-     if (chdir("../.."))
++-             return 1;
++-
+++     if (chdir(opwd))
+++             res = 1;
+++err:
+++     free(opwd);
+++     free(_name);
++      return res;
++ }
++ 
++@@ -657,7 +666,7 @@ int conf_write_autoconf(void)
++ 
++      sym_clear_all_valid();
++ 
++-     file_write_dep("include/config/auto.conf.cmd");
+++     file_write_dep(".config.cmd");
++ 
++      if (conf_split_config())
++              return 1;
++@@ -672,22 +681,19 @@ int conf_write_autoconf(void)
+               return 1;
+       }
+  
+@@ -204,7 +271,7 @@
+  
+       for_all_symbols(i, sym) {
+               sym_calc_value(sym);
+-@@ -700,19 +693,19 @@ int conf_write_autoconf(void)
++@@ -700,19 +706,19 @@ int conf_write_autoconf(void)
+                       case no:
+                               break;
+                       case mod:
+@@ -230,7 +297,7 @@
+                       while (1) {
+                               l = strcspn(str, "\"\\");
+                               if (l) {
+-@@ -732,14 +725,14 @@ int conf_write_autoconf(void)
++@@ -732,14 +738,14 @@ int conf_write_autoconf(void)
+               case S_HEX:
+                       str = sym_get_string_value(sym);
+                       if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
+@@ -249,8 +316,9 @@
+                       break;
+               default:
+                       break;
+---- kconfig/expr.c    2007-06-11 20:37:06.000000000 +0200
+-+++ Buildroot/expr.c  2007-06-28 13:24:38.000000000 +0200
++diff -rdup kernel-config/expr.c config/expr.c
++--- kernel-config/expr.c      2007-09-22 00:38:23.000000000 +0200
+++++ config/expr.c     2007-09-23 15:33:26.000000000 +0200
+ @@ -331,7 +331,7 @@ struct expr *expr_trans_bool(struct expr
+               e->right.expr = expr_trans_bool(e->right.expr);
+               break;
+@@ -421,305 +489,11 @@
+                               tmp = e->left.expr;
+                               free(e);
+                               e = tmp;
+---- kconfig/expr.h    2007-06-11 20:37:06.000000000 +0200
+-+++ Buildroot/expr.h  2007-06-28 13:08:57.000000000 +0200
++diff -rdup kernel-config/expr.h config/expr.h
++--- kernel-config/expr.h      2007-09-22 00:38:23.000000000 +0200
+++++ config/expr.h     2007-09-23 15:33:26.000000000 +0200
+ @@ -65,7 +65,7 @@ enum symbol_type {
+  
+  enum {
+       S_DEF_USER,             /* main user value */
+--     S_DEF_AUTO,
+-+     S_DEF_AUTO
+- };
+- 
+- struct symbol {
+-@@ -139,7 +139,7 @@ struct menu {
+-      struct property *prompt;
+-      struct expr *dep;
+-      unsigned int flags;
+--     //char *help;
+-+     /*char *help; */
+-      struct file *file;
+-      int lineno;
+-      void *data;
+---- kconfig/gconf.c   2007-06-11 20:37:06.000000000 +0200
+-+++ Buildroot/gconf.c 2007-06-28 12:15:29.000000000 +0200
+-@@ -271,8 +271,8 @@ void init_main_window(const gchar * glad
+-                                        /*"style", PANGO_STYLE_OBLIQUE, */
+-                                        NULL);
+- 
+--     sprintf(title, _("Linux Kernel v%s Configuration"),
+--             getenv("KERNELVERSION"));
+-+     sprintf(title, _("Buildroot v%s Configuration"),
+-+             getenv("VERSION"));
+-      gtk_window_set_title(GTK_WINDOW(main_wnd), title);
+- 
+-      gtk_widget_show(main_wnd);
+---- kconfig/gconf.glade       2007-06-11 20:37:06.000000000 +0200
+-+++ Buildroot/gconf.glade     2007-06-28 12:17:40.000000000 +0200
+-@@ -5,7 +5,7 @@
+- 
+- <widget class="GtkWindow" id="window1">
+-   <property name="visible">True</property>
+--  <property name="title" translatable="yes">Gtk Kernel Configurator</property>
+-+  <property name="title" translatable="yes">Gtk Buildroot Configurator</property>
+-   <property name="type">GTK_WINDOW_TOPLEVEL</property>
+-   <property name="window_position">GTK_WIN_POS_NONE</property>
+-   <property name="modal">False</property>
+---- kconfig/mconf.c   2007-06-11 20:37:06.000000000 +0200
+-+++ Buildroot/mconf.c 2007-06-28 12:15:29.000000000 +0200
+-@@ -30,20 +30,18 @@ static char menu_backtitle[128];
+- 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"
+-+"Some features may be built directly into Buildroot.  Some features\n"
+- "may be completely removed altogether.  There are also certain\n"
+--"kernel parameters which are not really features, but must be\n"
+-+"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 [*], <M> or [ ] represent features\n"
+--"configured to be built in, modularized or removed respectively.\n"
+--"Pointed brackets <> represent module capable features.\n"
+-+"Menu items beginning with [*] or [ ] represent features\n"
+-+"configured to be built in or removed respectively.\n"
+- "\n"
+- "To change any of these features, highlight it with the cursor\n"
+--"keys and press <Y> to build it in, <M> to make it a module or\n"
+--"<N> to removed it.  You may also press the <Space Bar> to cycle\n"
+--"through the available options (ie. Y->N->M->Y).\n"
+-+"keys and press <Y> to build it in or <N> to removed it.\n"
+-+"You may also press the <Space Bar> to cycle\n"
+-+"through the available options (ie. Y->N->Y).\n"
+- "\n"
+- "Some additional keyboard hints:\n"
+- "\n"
+-@@ -116,7 +114,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"
+-@@ -149,7 +147,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 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"
+-@@ -179,9 +177,9 @@ menu_instructions[] = N_(
+-      "Arrow keys navigate the menu.  "
+-      "<Enter> selects submenus --->.  "
+-      "Highlighted letters are hotkeys.  "
+--     "Pressing <Y> includes, <N> excludes, <M> modularizes features.  "
+-+     "Pressing <Y> selectes a feature, while <N> will exclude a feature.  "
+-      "Press <Esc><Esc> to exit, <?> for Help, </> for Search.  "
+--     "Legend: [*] built-in  [ ] excluded  <M> module  < > module capable"),
+-+     "Legend: [*] feature is selected  [ ] feature is excluded"),
+- radiolist_instructions[] = N_(
+-      "Use the arrow keys to navigate this window or "
+-      "press the hotkey of the item you wish to select "
+-@@ -201,18 +199,18 @@ setmod_text[] = N_(
+-      "This feature depends on another which has been configured as a module.\n"
+-      "As a result, this feature will be built as a module."),
+- nohelp_text[] = N_(
+--     "There is no help available for this kernel option.\n"),
+-+     "There is no help available for this option.\n"),
+- load_config_text[] = N_(
+-      "Enter the name of the configuration file you wish to load.  "
+-      "Accept the name shown to restore the configuration you "
+-      "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 Buildroot\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"
+-+     "Buildroot'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"
+-@@ -222,7 +220,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 Buildroot\n"
+-      "configurations available on a single machine.\n"
+-      "\n"
+-      "Entering a file name here will allow you to later retrieve, modify\n"
+-@@ -871,9 +869,9 @@ int main(int ac, char **av)
+-      conf_parse(av[1]);
+-      conf_read(NULL);
+- 
+--     sym = sym_lookup("KERNELVERSION", 0);
+-+     sym = sym_lookup("VERSION", 0);
+-      sym_calc_value(sym);
+--     sprintf(menu_backtitle, _("Linux Kernel v%s Configuration"),
+-+     sprintf(menu_backtitle, _("Buildroot v%s Configuration"),
+-              sym_get_string_value(sym));
+- 
+-      mode = getenv("MENUCONFIG_MODE");
+-@@ -893,7 +891,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 Buildroot configuration?\n"
+-                                           "<ESC><ESC> to continue."),
+-                                         6, 60);
+-              else
+-@@ -905,22 +903,22 @@ int main(int ac, char **av)
+-      case 0:
+-              if (conf_write(NULL)) {
+-                      fprintf(stderr, _("\n\n"
+--                             "Error during writing of the kernel configuration.\n"
+--                             "Your kernel configuration changes were NOT saved."
+-+                             "Error during writing of the Buildroot configuration.\n"
+-+                             "Your Buildroot 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 Buildroot configuration.\n"
+-+                     "*** Execute 'make' to build Buildroot or try 'make help'."
+-                      "\n\n"));
+-              break;
+-      default:
+-              fprintf(stderr, _("\n\n"
+--                     "Your kernel configuration changes were NOT saved."
+-+                     "Your Buildroot configuration changes were NOT saved."
+-                      "\n\n"));
+-      }
+- 
+--     return 0;
+-+     return conf_write_autoconf();
+- }
+---- kconfig/symbol.c  2007-06-11 20:37:06.000000000 +0200
+-+++ Buildroot/symbol.c        2007-06-28 12:15:29.000000000 +0200
+-@@ -61,10 +61,10 @@ void sym_init(void)
+-      if (p)
+-              sym_add_default(sym, p);
+- 
+--     sym = sym_lookup("KERNELVERSION", 0);
+-+     sym = sym_lookup("VERSION", 0);
+-      sym->type = S_STRING;
+-      sym->flags |= SYMBOL_AUTO;
+--     p = getenv("KERNELVERSION");
+-+     p = getenv("VERSION");
+-      if (p)
+-              sym_add_default(sym, p);
+- 
+---- kconfig/zconf.tab.c_shipped       2007-06-11 20:37:06.000000000 +0200
+-+++ Buildroot/zconf.tab.c_shipped     2007-06-28 12:15:29.000000000 +0200
+-@@ -2115,7 +2115,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, "Buildroot Configuration", NULL);
+- 
+- #if YYDEBUG
+-      if (getenv("ZCONF_DEBUG"))
+---- kconfig/zconf.y   2007-06-11 20:37:06.000000000 +0200
+-+++ Buildroot/zconf.y 2007-06-28 12:15:29.000000000 +0200
+-@@ -484,7 +484,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, "Buildroot Configuration", NULL);
+- 
+- #if YYDEBUG
+-      if (getenv("ZCONF_DEBUG"))
+-Index: confdata.c
+-===================================================================
+---- kconfig/confdata.c        (revision 18967)
+-+++ Buildroot/confdata.c      (working copy)
+-@@ -21,7 +21,7 @@ static void conf_warning(const char *fmt
+- static const char *conf_filename;
+- static int conf_lineno, conf_warnings, conf_unsaved;
+- 
+--const char conf_defname[] = "extra/Configs/defconfigs/$ARCH";
+-+const char conf_defname[] = ".defconfig";
+- 
+- static void conf_warning(const char *fmt, ...)
+- {
+---- kconfig/confdata.c        2007-07-02 16:07:19.000000000 +0200
+-+++ Buildroot/confdata.c      2007-07-02 16:05:21.000000000 +0200
+-@@ -651,7 +651,7 @@ int conf_write_autoconf(void)
+- 
+-      sym_clear_all_valid();
+- 
+--     file_write_dep("include/config/auto.conf.cmd");
+-+     file_write_dep(".config.cmd");
+- 
+-      if (conf_split_config())
+-              return 1;
+---- kconfig/confdata.c        2007-07-07 11:13:12.000000000 +0200
+-+++ Buildroot/confdata.c      2007-07-08 01:30:44.000000000 +0200
+-@@ -11,6 +11,7 @@
+- #include <string.h>
+- #include <time.h>
+- #include <unistd.h>
+-+#include <libgen.h>
+- 
+- #define LKC_DIRECT_LINK
+- #include "lkc.h"
+-@@ -529,7 +530,7 @@ int conf_write(const char *name)
+- 
+- int conf_split_config(void)
+- {
+--     char *name, path[128];
+-+     char *name, path[128], *opwd, *dir, *_name;
+-      char *s, *d, c;
+-      struct symbol *sym;
+-      struct stat sb;
+-@@ -540,8 +541,20 @@ int conf_split_config(void)
+-              name = "include/config/auto.conf";
+-      conf_read_simple(name, S_DEF_AUTO);
+- 
+--     if (chdir("include/config"))
+-+     opwd = malloc(256);
+-+     _name = strdup(name);
+-+     if (opwd == NULL || _name == NULL)
+-              return 1;
+-+     opwd = getcwd(opwd, 256);
+-+     dir = dirname(_name);
+-+     if (dir == NULL) {
+-+             res = 1;
+-+             goto err;
+-+     }
+-+     if (chdir(dir)) {
+-+             res = 1;
+-+             goto err;
+-+     }
+- 
+-      res = 0;
+-      for_all_symbols(i, sym) {
+-@@ -634,9 +647,11 @@ int conf_split_config(void)
+-              close(fd);
+-      }
+- out:
+--     if (chdir("../.."))
+--             return 1;
+--
+-+     if (chdir(opwd))
+-+             res = 1;
+-+err:
+-+     free(opwd);
+-+     free(_name);
+-      return res;
+- }
+- 
++-     S_DE
+\ No newline at end of file
+diff -rdup kernel-config/mconf.c config/mconf.c
+--- kernel-config/mconf.c      2007-09-22 00:38:23.000000000 +0200
++++ config/mconf.c     2007-09-23 15:36:33.000000000 +0200
+@@ -29,20 +29,18 @@
  static const char mconf_readme[] = N_(
  "Overview\n"
  "--------\n"
  "\n"
  "Some additional keyboard hints:\n"
  "\n"
-@@ -116,7 +114,7 @@ static const char mconf_readme[] = N_(
+@@ -115,7 +113,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"
  "\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"
-@@ -149,7 +147,7 @@ static const char mconf_readme[] = N_(
+@@ -148,7 +146,7 @@ static const char mconf_readme[] = N_(
  "\n"
  "Optional personality available\n"
  "------------------------------\n"
  "menu, rather than the default multimenu hierarchy, run the menuconfig\n"
  "with MENUCONFIG_MODE environment variable set to single_menu. Example:\n"
  "\n"
-@@ -179,9 +177,9 @@ menu_instructions[] = N_(
+@@ -178,9 +176,9 @@ menu_instructions[] = N_(
        "Arrow keys navigate the menu.  "
        "<Enter> selects submenus --->.  "
        "Highlighted letters are hotkeys.  "
  radiolist_instructions[] = N_(
        "Use the arrow keys to navigate this window or "
        "press the hotkey of the item you wish to select "
-@@ -201,18 +199,18 @@ setmod_text[] = N_(
+@@ -200,18 +198,18 @@ setmod_text[] = N_(
        "This feature depends on another which has been configured as a module.\n"
        "As a result, this feature will be built as a module."),
  nohelp_text[] = N_(
        "to modify that configuration.\n"
        "\n"
        "If you are uncertain, then you have probably never used alternate\n"
-@@ -222,7 +220,7 @@ save_config_text[] = N_(
+@@ -221,7 +219,7 @@ save_config_text[] = N_(
        "as an alternate.  Leave blank to abort."),
  save_config_help[] = N_(
        "\n"
        "configurations available on a single machine.\n"
        "\n"
        "Entering a file name here will allow you to later retrieve, modify\n"
-@@ -871,9 +869,9 @@ int main(int ac, char **av)
-       conf_parse(av[1]);
-       conf_read(NULL);
+@@ -400,10 +398,10 @@ static void set_config_filename(const ch
+       int size;
+       struct symbol *sym;
  
 -      sym = sym_lookup("KERNELVERSION", 0);
 +      sym = sym_lookup("VERSION", 0);
        sym_calc_value(sym);
--      sprintf(menu_backtitle, _("Linux Kernel v%s Configuration"),
-+      sprintf(menu_backtitle, _("Buildroot v%s Configuration"),
-               sym_get_string_value(sym));
-       mode = getenv("MENUCONFIG_MODE");
-@@ -893,7 +891,7 @@ int main(int ac, char **av)
+       size = snprintf(menu_backtitle, sizeof(menu_backtitle),
+-                      _("%s - Linux Kernel v%s Configuration"),
++                      _("%s - buildroot v%s Configuration"),
+                       config_filename, sym_get_string_value(sym));
+       if (size >= sizeof(menu_backtitle))
+               menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
+@@ -912,7 +910,7 @@ int main(int ac, char **av)
                if (conf_get_changed())
                        res = dialog_yesno(NULL,
                                           _("Do you wish to save your "
                                             "<ESC><ESC> to continue."),
                                           6, 60);
                else
-@@ -905,22 +903,22 @@ int main(int ac, char **av)
+@@ -924,22 +922,22 @@ int main(int ac, char **av)
        case 0:
-               if (conf_write(NULL)) {
+               if (conf_write(filename)) {
                        fprintf(stderr, _("\n\n"
 -                              "Error during writing of the kernel configuration.\n"
 -                              "Your kernel configuration changes were NOT saved."
 -      return 0;
 +      return conf_write_autoconf();
  }
---- kconfig/symbol.c   2007-06-11 20:37:06.000000000 +0200
-+++ Buildroot/symbol.c 2007-06-28 12:15:29.000000000 +0200
+diff -rdup kernel-config/symbol.c config/symbol.c
+--- kernel-config/symbol.c     2007-09-22 00:38:23.000000000 +0200
++++ config/symbol.c    2007-09-23 15:33:26.000000000 +0200
 @@ -61,10 +61,10 @@ void sym_init(void)
        if (p)
                sym_add_default(sym, p);
        if (p)
                sym_add_default(sym, p);
  
---- kconfig/zconf.tab.c_shipped        2007-06-11 20:37:06.000000000 +0200
-+++ Buildroot/zconf.tab.c_shipped      2007-06-28 12:15:29.000000000 +0200
+diff -rdup kernel-config/zconf.tab.c_shipped config/zconf.tab.c_shipped
+--- kernel-config/zconf.tab.c_shipped  2007-09-22 00:38:23.000000000 +0200
++++ config/zconf.tab.c_shipped 2007-09-23 15:33:26.000000000 +0200
 @@ -2115,7 +2115,7 @@ void conf_parse(const char *name)
        modules_sym = sym_lookup(NULL, 0);
        modules_sym->type = S_BOOLEAN;
  
  #if YYDEBUG
        if (getenv("ZCONF_DEBUG"))
---- kconfig/zconf.y    2007-06-11 20:37:06.000000000 +0200
-+++ Buildroot/zconf.y  2007-06-28 12:15:29.000000000 +0200
+diff -rdup kernel-config/zconf.y config/zconf.y
+--- kernel-config/zconf.y      2007-09-22 00:38:23.000000000 +0200
++++ config/zconf.y     2007-09-23 15:33:26.000000000 +0200
 @@ -484,7 +484,7 @@ void conf_parse(const char *name)
        modules_sym = sym_lookup(NULL, 0);
        modules_sym->type = S_BOOLEAN;
  
  #if YYDEBUG
        if (getenv("ZCONF_DEBUG"))
-Index: confdata.c
-===================================================================
---- kconfig/confdata.c (revision 18967)
-+++ Buildroot/confdata.c       (working copy)
-@@ -21,7 +21,7 @@ static void conf_warning(const char *fmt
- static const char *conf_filename;
- static int conf_lineno, conf_warnings, conf_unsaved;
+--- kernel-config/Makefile     2007-09-22 00:38:23.000000000 +0200
++++ config/Makefile    2007-07-27 20:09:15.000000000 +0200
+@@ -120,6 +120,9 @@
+ ifeq ($(MAKECMDGOALS),menuconfig)
+       hostprogs-y += mconf
+ endif
++ifeq ($(findstring mconf,$(MAKECMDGOALS)),mconf)
++      hostprogs-y += mconf
++endif
  
--const char conf_defname[] = "extra/Configs/defconfigs/$ARCH";
-+const char conf_defname[] = ".defconfig";
- static void conf_warning(const char *fmt, ...)
- {
---- kconfig/config/confdata.c  2007-07-02 16:07:19.000000000 +0200
-+++ Buildroot/config/confdata.c        2007-07-02 16:05:21.000000000 +0200
-@@ -651,7 +651,7 @@ int conf_write_autoconf(void)
-       sym_clear_all_valid();
--      file_write_dep("include/config/auto.conf.cmd");
-+      file_write_dep(".config.cmd");
-       if (conf_split_config())
-               return 1;
---- kconfig/config/confdata.c  2007-07-07 11:13:12.000000000 +0200
-+++ Buildroot/config/confdata.c        2007-07-08 01:30:44.000000000 +0200
-@@ -11,6 +11,7 @@
- #include <string.h>
- #include <time.h>
- #include <unistd.h>
-+#include <libgen.h>
- #define LKC_DIRECT_LINK
- #include "lkc.h"
-@@ -529,7 +530,7 @@ int conf_write(const char *name)
- int conf_split_config(void)
- {
--      char *name, path[128];
-+      char *name, path[128], *opwd, *dir, *_name;
-       char *s, *d, c;
-       struct symbol *sym;
-       struct stat sb;
-@@ -540,8 +541,20 @@ int conf_split_config(void)
-               name = "include/config/auto.conf";
-       conf_read_simple(name, S_DEF_AUTO);
--      if (chdir("include/config"))
-+      opwd = malloc(256);
-+      _name = strdup(name);
-+      if (opwd == NULL || _name == NULL)
-               return 1;
-+      opwd = getcwd(opwd, 256);
-+      dir = dirname(_name);
-+      if (dir == NULL) {
-+              res = 1;
-+              goto err;
-+      }
-+      if (chdir(dir)) {
-+              res = 1;
-+              goto err;
-+      }
-       res = 0;
-       for_all_symbols(i, sym) {
-@@ -634,9 +647,11 @@ int conf_split_config(void)
-               close(fd);
+ ifeq ($(MAKECMDGOALS),xconfig)
+       qconf-target := 1
+@@ -184,8 +186,8 @@
+         done; \
+         if [ -z "$$dir" ]; then \
+           echo "*"; \
+-          echo "* Unable to find the QT3 installation. Please make sure that"; \
+-          echo "* the QT3 development package is correctly installed and"; \
++          echo "* Unable to find the QT installation. Please make sure that"; \
++          echo "* the QT development package is correctly installed and"; \
+           echo "* either install pkg-config or set the QTDIR environment"; \
+           echo "* variable to the correct location."; \
+           echo "*"; \
+--- kernel-config/util.c       2007-09-22 00:38:23.000000000 +0200
++++ config/util.c      2007-09-23 15:57:18.000000000 +0200
+@@ -44,7 +44,7 @@
+               else
+                       fprintf(out, "\t%s\n", file->name);
        }
- out:
--      if (chdir("../.."))
--              return 1;
--
-+      if (chdir(opwd))
-+              res = 1;
-+err:
-+      free(opwd);
-+      free(_name);
-       return res;
- }
+-      fprintf(out, "\ninclude/config/auto.conf: \\\n"
++      fprintf(out, "\n$(BR2_DEPENDS_DIR)/config/auto.conf: \\\n"
+                    "\t$(deps_config)\n\n"
+                    "$(deps_config): ;\n");
+       fclose(out);
index 800f8c71c407f32893020c72c14d043147e8eeb1..0fdc9049296f5985d9abaf46aeda7e607ef5a80f 100644 (file)
@@ -2264,7 +2264,7 @@ FILE *zconf_fopen(const char *name)
        FILE *f;
 
        f = fopen(name, "r");
-       if (!f && name[0] != '/') {
+       if (!f && name != NULL && name[0] != '/') {
                env = getenv(SRCTREE);
                if (env) {
                        sprintf(fullname, "%s/%s", env, name);
index 9b2706a41548d3b5224caed652b2a4f74f68eed4..8a07ee4f6bd486a8cb18fec1297ef1f21dc08e82 100644 (file)
@@ -64,6 +64,7 @@ int zconf_lineno(void);
 char *zconf_curname(void);
 
 /* confdata.c */
+const char *conf_get_configname(void);
 char *conf_get_default_confname(void);
 void sym_set_change_count(int count);
 void sym_add_change_count(int count);
index 120d624e672c5740faf2aa744aa7785c5edbecab..cdca7388e0f1f982ae0a05994bbb7e22a6ef74b0 100644 (file)
@@ -4,21 +4,15 @@
 # What library to link
 ldflags()
 {
-       $cc -print-file-name=libncursesw.so | grep -q /
-       if [ $? -eq 0 ]; then
-               echo '-lncursesw'
-               exit
-       fi
-       $cc -print-file-name=libncurses.so | grep -q /
-       if [ $? -eq 0 ]; then
-               echo '-lncurses'
-               exit
-       fi
-       $cc -print-file-name=libcurses.so | grep -q /
-       if [ $? -eq 0 ]; then
-               echo '-lcurses'
-               exit
-       fi
+       for ext in so a dylib ; do
+               for lib in ncursesw ncurses curses ; do
+                       $cc -print-file-name=lib${lib}.${ext} | grep -q /
+                       if [ $? -eq 0 ]; then
+                               echo "-l${lib}"
+                               exit
+                       fi
+               done
+       done
        exit 1
 }
 
index fd695e1070f76de6d64f2b6d95b2b2a5fbf84a9f..7e17eba75ae8d8e7b23cef47fe19096fa33870db 100644 (file)
@@ -188,6 +188,7 @@ int on_key_esc(WINDOW *win);
 int on_key_resize(void);
 
 void init_dialog(const char *backtitle);
+void set_dialog_backtitle(const char *backtitle);
 void reset_dialog(void);
 void end_dialog(void);
 void attr_clear(WINDOW * win, int height, int width, chtype attr);
index d54440fc166cbd03bc8c16c9c91667fd9631761e..a1bddefe73d07485ab008b382a71905ede31ee71 100644 (file)
@@ -272,6 +272,11 @@ void init_dialog(const char *backtitle)
        color_setup(getenv("MENUCONFIG_COLOR"));
 }
 
+void set_dialog_backtitle(const char *backtitle)
+{
+       dlg.backtitle = backtitle;
+}
+
 void reset_dialog(void)
 {
        initscr();              /* Init curses */
@@ -336,7 +341,7 @@ void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x)
                newl = 1;
                word = tempstr;
                while (word && *word) {
-                       sp = index(word, ' ');
+                       sp = strchr(word, ' ');
                        if (sp)
                                *sp++ = 0;
 
@@ -348,7 +353,7 @@ void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x)
                        if (wlen > room ||
                            (newl && wlen < 4 && sp
                             && wlen + 1 + strlen(sp) > room
-                            && (!(sp2 = index(sp, ' '))
+                            && (!(sp2 = strchr(sp, ' '))
                                 || wlen + 1 + (sp2 - sp) > room))) {
                                cur_y++;
                                cur_x = x;
index 3288822f12db2484e8dfdd89a95e1a6cf2a42c42..9b72847575e597d0b7c3e5d3f5139bc3d7e336f1 100644 (file)
@@ -26,7 +26,6 @@
 #include "lkc.h"
 #include "lxdialog/dialog.h"
 
-static char menu_backtitle[128];
 static const char mconf_readme[] = N_(
 "Overview\n"
 "--------\n"
@@ -269,7 +268,6 @@ search_help[] = N_(
        "          USB$ => find all CONFIG_ symbols ending with USB\n"
        "\n");
 
-static char filename[PATH_MAX+1] = ".config";
 static int indent;
 static struct termios ios_org;
 static int rows = 0, cols = 0;
@@ -393,6 +391,28 @@ static struct gstr get_relations_str(struct symbol **sym_arr)
        return res;
 }
 
+static char filename[PATH_MAX+1];
+static void set_config_filename(const char *config_filename)
+{
+       static char menu_backtitle[PATH_MAX+128];
+       int size;
+       struct symbol *sym;
+
+       sym = sym_lookup("VERSION", 0);
+       sym_calc_value(sym);
+       size = snprintf(menu_backtitle, sizeof(menu_backtitle),
+                       _("%s - buildroot v%s Configuration"),
+                       config_filename, sym_get_string_value(sym));
+       if (size >= sizeof(menu_backtitle))
+               menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
+       set_dialog_backtitle(menu_backtitle);
+
+       size = snprintf(filename, sizeof(filename), "%s", config_filename);
+       if (size >= sizeof(filename))
+               filename[sizeof(filename)-1] = '\0';
+}
+
+
 static void search_conf(void)
 {
        struct symbol **sym_arr;
@@ -814,8 +834,10 @@ static void conf_load(void)
                case 0:
                        if (!dialog_input_result[0])
                                return;
-                       if (!conf_read(dialog_input_result))
+                       if (!conf_read(dialog_input_result)) {
+                               set_config_filename(dialog_input_result);
                                return;
+                       }
                        show_textbox(NULL, _("File does not exist!"), 5, 38);
                        break;
                case 1:
@@ -838,8 +860,10 @@ static void conf_save(void)
                case 0:
                        if (!dialog_input_result[0])
                                return;
-                       if (!conf_write(dialog_input_result))
+                       if (!conf_write(dialog_input_result)) {
+                               set_config_filename(dialog_input_result);
                                return;
+                       }
                        show_textbox(NULL, _("Can't create file!  Probably a nonexistent directory."), 5, 60);
                        break;
                case 1:
@@ -858,7 +882,6 @@ static void conf_cleanup(void)
 
 int main(int ac, char **av)
 {
-       struct symbol *sym;
        char *mode;
        int res;
 
@@ -869,11 +892,6 @@ int main(int ac, char **av)
        conf_parse(av[1]);
        conf_read(NULL);
 
-       sym = sym_lookup("VERSION", 0);
-       sym_calc_value(sym);
-       sprintf(menu_backtitle, _("Buildroot v%s Configuration"),
-               sym_get_string_value(sym));
-
        mode = getenv("MENUCONFIG_MODE");
        if (mode) {
                if (!strcasecmp(mode, "single_menu"))
@@ -884,7 +902,8 @@ int main(int ac, char **av)
        atexit(conf_cleanup);
        init_wsize();
        reset_dialog();
-       init_dialog(menu_backtitle);
+       init_dialog(NULL);
+       set_config_filename(conf_get_configname());
        do {
                conf(&rootmenu);
                dialog_clear();
@@ -901,7 +920,7 @@ int main(int ac, char **av)
 
        switch (res) {
        case 0:
-               if (conf_write(NULL)) {
+               if (conf_write(filename)) {
                        fprintf(stderr, _("\n\n"
                                "Error during writing of the Buildroot configuration.\n"
                                "Your Buildroot configuration changes were NOT saved."
index c86c27f2c76135f4b69d4f24149f6559e72370fb..f14aeac67d4f282e9e5c3edbe4a1398af1a7c4fb 100644 (file)
@@ -203,7 +203,7 @@ void sym_check_prop(struct symbol *sym)
                        else if (sym2->type == S_UNKNOWN)
                                prop_warn(prop,
                                    "'select' used by config symbol '%s' "
-                                   "refer to undefined symbol '%s'",
+                                   "refers to undefined symbol '%s'",
                                    sym->name, sym2->name);
                        else if (sym2->type != S_BOOLEAN && sym2->type != S_TRISTATE)
                                prop_warn(prop,
index 512c2f5c341d015cc06b5e9361ee06592ab57b9d..f2a23a9c39386492773a9832603b13fb9ec7fb10 100644 (file)
@@ -1182,7 +1182,7 @@ void ConfigInfoView::contentsContextMenuEvent(QContextMenuEvent *e)
        Parent::contentsContextMenuEvent(e);
 }
 
-ConfigSearchWindow::ConfigSearchWindow(QWidget* parent, const char *name)
+ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *name)
        : Parent(parent, name), result(NULL)
 {
        setCaption("Search Config");
@@ -1206,6 +1206,9 @@ ConfigSearchWindow::ConfigSearchWindow(QWidget* parent, const char *name)
        info = new ConfigInfoView(split, name);
        connect(list->list, SIGNAL(menuChanged(struct menu *)),
                info, SLOT(setInfo(struct menu *)));
+       connect(list->list, SIGNAL(menuChanged(struct menu *)),
+               parent, SLOT(setMenuLink(struct menu *)));
+
        layout1->addWidget(split);
 
        if (name) {
index 6fc1c5f14425162aab07eb5e35f8d24f0c8ccadc..b3b5657b6b35423c003bf40aff66cc047e894d22 100644 (file)
@@ -279,7 +279,7 @@ class ConfigSearchWindow : public QDialog {
        Q_OBJECT
        typedef class QDialog Parent;
 public:
-       ConfigSearchWindow(QWidget* parent, const char *name = 0);
+       ConfigSearchWindow(ConfigMainWindow* parent, const char *name = 0);
 
 public slots:
        void saveSettings(void);
index 9fbe737febda4dd69fc0247cbe7067d6610749c5..fd23f481492f9198366475a17c4bcbc3199958a5 100644 (file)
@@ -786,13 +786,15 @@ static struct symbol *sym_check_expr_deps(struct expr *e)
        return NULL;
 }
 
+/* return NULL when dependencies are OK */
 struct symbol *sym_check_deps(struct symbol *sym)
 {
        struct symbol *sym2;
        struct property *prop;
 
        if (sym->flags & SYMBOL_CHECK) {
-               printf("Warning! Found recursive dependency: %s", sym->name);
+               fprintf(stderr, "%s:%d:error: found recursive dependency: %s",
+                       sym->prop->file->name, sym->prop->lineno, sym->name);
                return sym;
        }
        if (sym->flags & SYMBOL_CHECKED)
@@ -816,13 +818,8 @@ struct symbol *sym_check_deps(struct symbol *sym)
                        goto out;
        }
 out:
-       if (sym2) {
-               printf(" %s", sym->name);
-               if (sym2 == sym) {
-                       printf("\n");
-                       sym2 = NULL;
-               }
-       }
+       if (sym2)
+               fprintf(stderr, " -> %s%s", sym->name, sym2 == sym? "\n": "");
        sym->flags &= ~SYMBOL_CHECK;
        return sym2;
 }
index e3f28b9d59f4723347cc3c941adcfaa7305e119f..4973ee5d529c1a357300ab250ae63baaa00688ee 100644 (file)
@@ -44,7 +44,7 @@ int file_write_dep(const char *name)
                else
                        fprintf(out, "\t%s\n", file->name);
        }
-       fprintf(out, "\ninclude/config/auto.conf: \\\n"
+       fprintf(out, "\n$(BR2_DEPENDS_DIR)/config/auto.conf: \\\n"
                     "\t$(deps_config)\n\n"
                     "$(deps_config): ;\n");
        fclose(out);
index cfa46077c6b43a45dad6d89c60ea5dd274c566cf..187d38ccadd57f489b89cbbf16798cdf5f08ef49 100644 (file)
@@ -265,7 +265,7 @@ FILE *zconf_fopen(const char *name)
        FILE *f;
 
        f = fopen(name, "r");
-       if (!f && name[0] != '/') {
+       if (!f && name != NULL && name[0] != '/') {
                env = getenv(SRCTREE);
                if (env) {
                        sprintf(fullname, "%s/%s", env, name);
index 28e1985ad19041078f9878deead92e336ac619d3..b82ea09218ed501cb735b48000fcfc8e96ca5b67 100644 (file)
@@ -2132,9 +2132,11 @@ void conf_parse(const char *name)
        }
        menu_finalize(&rootmenu);
        for_all_symbols(i, sym) {
-               sym_check_deps(sym);
+               if (sym_check_deps(sym))
+                       zconfnerrs++;
         }
-
+       if (zconfnerrs)
+               exit(1);
        sym_set_change_count(1);
 }
 
index 438fe4bed6530613e3563e98173437ad0609d443..13465c7667a0389cf31b5c4f4b160e17de2b7e62 100644 (file)
@@ -501,9 +501,11 @@ void conf_parse(const char *name)
        }
        menu_finalize(&rootmenu);
        for_all_symbols(i, sym) {
-               sym_check_deps(sym);
+               if (sym_check_deps(sym))
+                       zconfnerrs++;
         }
-
+       if (zconfnerrs)
+               exit(1);
        sym_set_change_count(1);
 }