kconfig: sync with linux-3.0
authorPeter Korsgaard <jacmet@sunsite.dk>
Fri, 13 Jan 2012 11:48:28 +0000 (12:48 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sun, 15 Jan 2012 19:48:04 +0000 (20:48 +0100)
And drop unused make-write-deps patch.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
19 files changed:
support/kconfig/Makefile
support/kconfig/conf.c
support/kconfig/confdata.c
support/kconfig/expr.h
support/kconfig/gconf.c
support/kconfig/lex.zconf.c_shipped
support/kconfig/nconf.c
support/kconfig/patches/03-change-config-option-prefix.patch
support/kconfig/patches/05-really-clean-everything.patch [deleted file]
support/kconfig/patches/06-br-build-system-integration.patch
support/kconfig/patches/08-make-write-deps.patch [deleted file]
support/kconfig/patches/09-implement-kconfig-probability.patch
support/kconfig/patches/12-fix-glade-file-path.patch
support/kconfig/patches/14-support-out-of-tree-config.patch
support/kconfig/patches/series
support/kconfig/qconf.cc
support/kconfig/streamline_config.pl
support/kconfig/util.c
support/kconfig/zconf.l

index ece2a822fc13faac389e672983643f1f565e048a..f2def76f0a16c05108570757413815a437583850 100644 (file)
@@ -77,14 +77,15 @@ localyesconfig: $(obj)/streamline_config.pl $(obj)/conf
 # The symlink is used to repair a deficiency in arch/um
 update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
        $(Q)echo "  GEN config"
-       $(Q)xgettext --default-domain=linux              \
-           --add-comments --keyword=_ --keyword=N_      \
-           --from-code=UTF-8                            \
-           --files-from=scripts/kconfig/POTFILES.in     \
+       $(Q)xgettext --default-domain=linux                         \
+           --add-comments --keyword=_ --keyword=N_                 \
+           --from-code=UTF-8                                       \
+           --files-from=$(srctree)/scripts/kconfig/POTFILES.in     \
+           --directory=$(srctree) --directory=$(objtree)           \
            --output $(obj)/config.pot
        $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot
-       $(Q)ln -fs Kconfig.i386 arch/um/Kconfig.arch
-       $(Q)(for i in `ls arch/*/Kconfig`;               \
+       $(Q)ln -fs Kconfig.x86 arch/um/Kconfig
+       $(Q)(for i in `ls $(srctree)/arch/*/Kconfig`;    \
            do                                           \
                echo "  GEN $$i";                        \
                $(obj)/kxgettext $$i                     \
@@ -92,7 +93,7 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
            done )
        $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \
            --output $(obj)/linux.pot
-       $(Q)rm -f arch/um/Kconfig.arch
+       $(Q)rm -f $(srctree)/arch/um/Kconfig
        $(Q)rm -f $(obj)/config.pot
 
 PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig
@@ -168,56 +169,44 @@ conf-objs := conf.o  zconf.tab.o
 mconf-objs     := mconf.o zconf.tab.o $(lxdialog)
 nconf-objs     := nconf.o zconf.tab.o nconf.gui.o
 kxgettext-objs := kxgettext.o zconf.tab.o
+qconf-cxxobjs  := qconf.o
+qconf-objs     := kconfig_load.o zconf.tab.o
+gconf-objs     := gconf.o kconfig_load.o zconf.tab.o
 
-hostprogs-y := conf qconf gconf kxgettext
+hostprogs-y := conf
 
-ifeq ($(MAKECMDGOALS),nconfig)
+ifeq ($(MAKECMDGOALS),nconf)
        hostprogs-y += nconf
 endif
-ifeq ($(findstring nconf,$(MAKECMDGOALS)),nconf)
-       hostprogs-y += nconf
-endif
 
-ifeq ($(MAKECMDGOALS),menuconfig)
+ifeq ($(MAKECMDGOALS),mconf)
        hostprogs-y += mconf
 endif
-ifeq ($(findstring mconf,$(MAKECMDGOALS)),mconf)
-       hostprogs-y += mconf
-endif
 
-ifeq ($(MAKECMDGOALS),xconfig)
-       qconf-target := 1
-endif
-ifeq ($(findstring qconf,$(MAKECMDGOALS)),qconf)
-       qconf-target := 1
+ifeq ($(MAKECMDGOALS),update-po-config)
+       hostprogs-y += kxgettext
 endif
 
-ifeq ($(MAKECMDGOALS),gconfig)
-       gconf-target := 1
+ifeq ($(MAKECMDGOALS),qconf)
+       qconf-target := 1
 endif
-ifeq ($(findstring gconf,$(MAKECMDGOALS)),gconf)
+ifeq ($(MAKECMDGOALS),gconf)
        gconf-target := 1
 endif
 
+
 ifeq ($(qconf-target),1)
-qconf-cxxobjs  := qconf.o
-qconf-objs     := kconfig_load.o zconf.tab.o
+       hostprogs-y += qconf
 endif
 
 ifeq ($(gconf-target),1)
-gconf-objs     := gconf.o kconfig_load.o zconf.tab.o
+       hostprogs-y += gconf
 endif
 
-clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
-               .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
-clean-files += config.pot linux.pot
-clean-files += conf $(conf-objs)
-clean-files += mconf $(mconf-objs)
-clean-files += nconf $(nconf-objs)
-clean-files += qconf qconf.o
-clean-files += gconf gconf.o
-clean-files += kconfig_load.o zconf.tab.o
-clean-files += $(kxgettext-objs)
+clean-files    := lkc_defs.h qconf.moc .tmp_qtcheck .tmp_gtkcheck
+clean-files    += zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
+clean-files     += mconf qconf gconf nconf
+clean-files     += config.pot linux.pot
 
 # Check that we have the required ncurses stuff installed for lxdialog (menuconfig)
 PHONY += $(obj)/dochecklxdialog
@@ -339,11 +328,12 @@ $(obj)/%.moc: $(src)/%.h
        $(KC_QT_MOC) -i $< -o $@
 
 $(obj)/lkc_defs.h: $(src)/lkc_proto.h
-       sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
+       $(Q)sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
 
 # Extract gconf menu items for I18N support
 $(obj)/gconf.glade.h: $(obj)/gconf.glade
-       intltool-extract --type=gettext/glade $(obj)/gconf.glade
+       $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
+       $(obj)/gconf.glade
 
 ###
 # The following requires flex/bison/gperf
index 652e079a600c9ef6c45b966ac2cec4c7ab415e2f..ed9402a6029a89453504b05ac9a0b3a8c04dce14 100644 (file)
@@ -332,7 +332,7 @@ static int conf_choice(struct menu *menu)
                }
                if (!child)
                        continue;
-               if (line[strlen(line) - 1] == '?') {
+               if (line[0] && line[strlen(line) - 1] == '?') {
                        print_help(child);
                        continue;
                }
index c9f13eec74ee31186c22cff3f6fb7ec85a9171a2..54f20ca96a899d438f65f1255e8f2bc1880d263b 100644 (file)
@@ -559,8 +559,6 @@ int conf_write(const char *name)
        const char *basename;
        const char *str;
        char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1];
-       time_t now;
-       int use_timestamp = 1;
        char *env;
 
        if (!name)
@@ -600,19 +598,11 @@ int conf_write(const char *name)
        if (!out)
                return 1;
 
-       time(&now);
-       env = getenv("KCONFIG_NOTIMESTAMP");
-       if (env && *env)
-               use_timestamp = 0;
-
        fprintf(out, _("#\n"
                       "# Automatically generated make config: don't edit\n"
                       "# %s\n"
-                      "%s%s"
                       "#\n"),
-                    rootmenu.prompt->text,
-                    use_timestamp ? "# " : "",
-                    use_timestamp ? ctime(&now) : "");
+                    rootmenu.prompt->text);
 
        if (!conf_get_changed())
                sym_clear_all_valid();
@@ -801,7 +791,6 @@ int conf_write_autoconf(void)
        const char *str;
        const char *name;
        FILE *out, *tristate, *out_h;
-       time_t now;
        int i;
        char dir[PATH_MAX+1], buf[PATH_MAX+1];
        char *s;
@@ -841,22 +830,19 @@ int conf_write_autoconf(void)
                return 1;
        }
 
-       time(&now);
        fprintf(out, "#\n"
                     "# Automatically generated make config: don't edit\n"
                     "# %s\n"
-                    "# %s"
                     "#\n",
-                    rootmenu.prompt->text, ctime(&now));
+                    rootmenu.prompt->text);
        fprintf(tristate, "#\n"
                          "# Automatically generated - do not edit\n"
                          "\n");
        fprintf(out_h, "/*\n"
                       " * Automatically generated C config: don't edit\n"
                       " * %s\n"
-                      " * %s"
                       " */\n",
-                      rootmenu.prompt->text, ctime(&now));
+                      rootmenu.prompt->text);
 
        for_all_symbols(i, sym) {
                sym_calc_value(sym);
index 3d238db4976405fee6aa122c3582e4a717a25315..16bfae2d321742bd5bf06e0a17e3e6377b47ef71 100644 (file)
@@ -20,12 +20,8 @@ struct file {
        struct file *parent;
        const char *name;
        int lineno;
-       int flags;
 };
 
-#define FILE_BUSY              0x0001
-#define FILE_SCANNED           0x0002
-
 typedef enum tristate {
        no, mod, yes
 } tristate;
index f9daf987d9d2edaacc10d8ff51508912c4be016d..79479c323951d3f425b87f42f2d7d7d3ec3a9766 100644 (file)
@@ -253,7 +253,7 @@ void init_left_tree(void)
 
        gtk_tree_view_set_model(view, model1);
        gtk_tree_view_set_headers_visible(view, TRUE);
-       gtk_tree_view_set_rules_hint(view, FALSE);
+       gtk_tree_view_set_rules_hint(view, TRUE);
 
        column = gtk_tree_view_column_new();
        gtk_tree_view_append_column(view, column);
@@ -298,7 +298,7 @@ void init_right_tree(void)
 
        gtk_tree_view_set_model(view, model2);
        gtk_tree_view_set_headers_visible(view, TRUE);
-       gtk_tree_view_set_rules_hint(view, FALSE);
+       gtk_tree_view_set_rules_hint(view, TRUE);
 
        column = gtk_tree_view_column_new();
        gtk_tree_view_append_column(view, column);
@@ -756,7 +756,6 @@ void on_load_clicked(GtkButton * button, gpointer user_data)
 void on_single_clicked(GtkButton * button, gpointer user_data)
 {
        view_mode = SINGLE_VIEW;
-       gtk_paned_set_position(GTK_PANED(hpaned), 0);
        gtk_widget_hide(tree1_w);
        current = &rootmenu;
        display_tree_part();
@@ -782,7 +781,6 @@ void on_split_clicked(GtkButton * button, gpointer user_data)
 void on_full_clicked(GtkButton * button, gpointer user_data)
 {
        view_mode = FULL_VIEW;
-       gtk_paned_set_position(GTK_PANED(hpaned), 0);
        gtk_widget_hide(tree1_w);
        if (tree2)
                gtk_tree_store_clear(tree2);
@@ -1444,6 +1442,12 @@ static void display_tree(struct menu *menu)
                 if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT))
                    || (view_mode == FULL_VIEW)
                    || (view_mode == SPLIT_VIEW))*/
+
+               /* Change paned position if the view is not in 'split mode' */
+               if (view_mode == SINGLE_VIEW || view_mode == FULL_VIEW) {
+                       gtk_paned_set_position(GTK_PANED(hpaned), 0);
+               }
+
                if (((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT))
                    || (view_mode == FULL_VIEW)
                    || (view_mode == SPLIT_VIEW)) {
index 6eb039718259a38838268c7df29a2212cb265bed..d9182916f72494d3138a93a352f24a11ee3f06e7 100644 (file)
@@ -2363,11 +2363,11 @@ void zconf_initscan(const char *name)
 
        current_file = file_lookup(name);
        current_file->lineno = 1;
-       current_file->flags = FILE_BUSY;
 }
 
 void zconf_nextfile(const char *name)
 {
+       struct file *iter;
        struct file *file = file_lookup(name);
        struct buffer *buf = malloc(sizeof(*buf));
        memset(buf, 0, sizeof(*buf));
@@ -2383,18 +2383,25 @@ void zconf_nextfile(const char *name)
        buf->parent = current_buf;
        current_buf = buf;
 
-       if (file->flags & FILE_BUSY) {
-               printf("%s:%d: do not source '%s' from itself\n",
-                      zconf_curname(), zconf_lineno(), name);
-               exit(1);
-       }
-       if (file->flags & FILE_SCANNED) {
-               printf("%s:%d: file '%s' is already sourced from '%s'\n",
-                      zconf_curname(), zconf_lineno(), name,
-                      file->parent->name);
-               exit(1);
+       for (iter = current_file->parent; iter; iter = iter->parent ) {
+               if (!strcmp(current_file->name,iter->name) ) {
+                       printf("%s:%d: recursive inclusion detected. "
+                              "Inclusion path:\n  current file : '%s'\n",
+                              zconf_curname(), zconf_lineno(),
+                              zconf_curname());
+                       iter = current_file->parent;
+                       while (iter && \
+                              strcmp(iter->name,current_file->name)) {
+                               printf("  included from: '%s:%d'\n",
+                                      iter->name, iter->lineno-1);
+                               iter = iter->parent;
+                       }
+                       if (iter)
+                               printf("  included from: '%s:%d'\n",
+                                      iter->name, iter->lineno+1);
+                       exit(1);
+               }
        }
-       file->flags |= FILE_BUSY;
        file->lineno = 1;
        file->parent = current_file;
        current_file = file;
@@ -2404,8 +2411,6 @@ static void zconf_endfile(void)
 {
        struct buffer *parent;
 
-       current_file->flags |= FILE_SCANNED;
-       current_file->flags &= ~FILE_BUSY;
        current_file = current_file->parent;
 
        parent = current_buf->parent;
index db56377393d7922229562fa1ea767f3288424e25..488dd741078747132b08dc9afb33001f4a03db5a 100644 (file)
@@ -373,18 +373,18 @@ static void print_function_line(void)
        const int skip = 1;
 
        for (i = 0; i < function_keys_num; i++) {
-               wattrset(main_window, attributes[FUNCTION_HIGHLIGHT]);
+               (void) wattrset(main_window, attributes[FUNCTION_HIGHLIGHT]);
                mvwprintw(main_window, LINES-3, offset,
                                "%s",
                                function_keys[i].key_str);
-               wattrset(main_window, attributes[FUNCTION_TEXT]);
+               (void) wattrset(main_window, attributes[FUNCTION_TEXT]);
                offset += strlen(function_keys[i].key_str);
                mvwprintw(main_window, LINES-3,
                                offset, "%s",
                                function_keys[i].func);
                offset += strlen(function_keys[i].func) + skip;
        }
-       wattrset(main_window, attributes[NORMAL]);
+       (void) wattrset(main_window, attributes[NORMAL]);
 }
 
 /* help */
@@ -953,16 +953,16 @@ static void show_menu(const char *prompt, const char *instructions,
        current_instructions = instructions;
 
        clear();
-       wattrset(main_window, attributes[NORMAL]);
+       (void) wattrset(main_window, attributes[NORMAL]);
        print_in_middle(stdscr, 1, 0, COLS,
                        menu_backtitle,
                        attributes[MAIN_HEADING]);
 
-       wattrset(main_window, attributes[MAIN_MENU_BOX]);
+       (void) wattrset(main_window, attributes[MAIN_MENU_BOX]);
        box(main_window, 0, 0);
-       wattrset(main_window, attributes[MAIN_MENU_HEADING]);
+       (void) wattrset(main_window, attributes[MAIN_MENU_HEADING]);
        mvwprintw(main_window, 0, 3, " %s ", prompt);
-       wattrset(main_window, attributes[NORMAL]);
+       (void) wattrset(main_window, attributes[NORMAL]);
 
        set_menu_items(curses_menu, curses_menu_items);
 
index d387236e7e654149017b5a2acf27286a542b1029..4c51eaa9b8e0eaa0024c7ed00c7851a7dc516e5f 100644 (file)
@@ -4,10 +4,10 @@
  menu.c     |    2 +-
  3 files changed, 31 insertions(+), 30 deletions(-)
 
-Index: config/confdata.c
+Index: kconfig/confdata.c
 ===================================================================
---- config.orig/confdata.c
-+++ config/confdata.c
+--- kconfig.orig/confdata.c
++++ kconfig/confdata.c
 @@ -12,6 +12,7 @@
  #include <string.h>
  #include <time.h>
@@ -125,7 +125,7 @@ Index: config/confdata.c
                break;
        case S_OTHER:
        case S_UNKNOWN:
-@@ -844,17 +845,17 @@
+@@ -830,17 +831,17 @@
                        case no:
                                break;
                        case mod:
@@ -151,7 +151,7 @@ Index: config/confdata.c
                                break;
                        }
                        break;
-@@ -864,14 +865,14 @@
+@@ -850,14 +851,14 @@
                case S_HEX:
                        str = sym_get_string_value(sym);
                        if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
@@ -170,10 +170,10 @@ Index: config/confdata.c
                        break;
                default:
                        break;
-Index: config/lkc.h
+Index: kconfig/lkc.h
 ===================================================================
---- config.orig/lkc.h
-+++ config/lkc.h
+--- kconfig.orig/lkc.h
++++ kconfig/lkc.h
 @@ -42,7 +42,7 @@
  #define N_(text) (text)
  
@@ -183,10 +183,10 @@ Index: config/lkc.h
  #endif
  
  #define TF_COMMAND    0x0001
-Index: config/menu.c
+Index: kconfig/menu.c
 ===================================================================
---- config.orig/menu.c
-+++ config/menu.c
+--- kconfig.orig/menu.c
++++ kconfig/menu.c
 @@ -597,7 +597,7 @@
  
        if (menu_has_help(menu)) {
diff --git a/support/kconfig/patches/05-really-clean-everything.patch b/support/kconfig/patches/05-really-clean-everything.patch
deleted file mode 100644 (file)
index a151754..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
----
- Makefile |   14 ++++++++++----
- 1 file changed, 10 insertions(+), 4 deletions(-)
-
-Index: config/Makefile
-===================================================================
---- config.orig/Makefile
-+++ config/Makefile
-@@ -196,10 +196,16 @@
- gconf-objs    := gconf.o kconfig_load.o zconf.tab.o
- endif
--clean-files   := lkc_defs.h qconf.moc .tmp_qtcheck \
--                 .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
--clean-files     += mconf qconf gconf nconf
--clean-files     += config.pot linux.pot
-+clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
-+               .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
-+clean-files += config.pot linux.pot
-+clean-files += conf $(conf-objs)
-+clean-files += mconf $(mconf-objs)
-+clean-files += nconf $(nconf-objs)
-+clean-files += qconf qconf.o
-+clean-files += gconf gconf.o
-+clean-files += kconfig_load.o zconf.tab.o
-+clean-files += $(kxgettext-objs)
- # Check that we have the required ncurses stuff installed for lxdialog (menuconfig)
- PHONY += $(obj)/dochecklxdialog
index 8a27e251ead30e4417d53c103f32c04e2fdc82f3..feb166d36c57a20786bb689ea2a30eeca4bbeaaf 100644 (file)
@@ -1,40 +1,35 @@
 ---
- Makefile |   14 +++++++++++++-
- 1 file changed, 13 insertions(+), 1 deletion(-)
+ Makefile |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
 
-Index: config/Makefile
+Index: kconfig/Makefile
 ===================================================================
---- config.orig/Makefile
-+++ config/Makefile
-@@ -174,18 +174,30 @@
- ifeq ($(MAKECMDGOALS),nconfig)
+--- kconfig.orig/Makefile
++++ kconfig/Makefile
+@@ -175,11 +175,11 @@
+ hostprogs-y := conf
+-ifeq ($(MAKECMDGOALS),nconfig)
++ifeq ($(MAKECMDGOALS),nconf)
        hostprogs-y += nconf
  endif
-+ifeq ($(findstring nconf,$(MAKECMDGOALS)),nconf)
-+       hostprogs-y += nconf
-+endif
  
- ifeq ($(MAKECMDGOALS),menuconfig)
+-ifeq ($(MAKECMDGOALS),menuconfig)
++ifeq ($(MAKECMDGOALS),mconf)
        hostprogs-y += mconf
  endif
-+ifeq ($(findstring mconf,$(MAKECMDGOALS)),mconf)
-+       hostprogs-y += mconf
-+endif
  
- ifeq ($(MAKECMDGOALS),xconfig)
+@@ -187,10 +187,10 @@
+       hostprogs-y += kxgettext
+ endif
+-ifeq ($(MAKECMDGOALS),xconfig)
++ifeq ($(MAKECMDGOALS),qconf)
        qconf-target := 1
  endif
-+ifeq ($(findstring qconf,$(MAKECMDGOALS)),qconf)
-+      qconf-target := 1
-+endif
-+
- ifeq ($(MAKECMDGOALS),gconfig)
+-ifeq ($(MAKECMDGOALS),gconfig)
++ifeq ($(MAKECMDGOALS),gconf)
        gconf-target := 1
  endif
--
-+ifeq ($(findstring gconf,$(MAKECMDGOALS)),gconf)
-+      gconf-target := 1
-+endif
  
- ifeq ($(qconf-target),1)
- qconf-cxxobjs := qconf.o
diff --git a/support/kconfig/patches/08-make-write-deps.patch b/support/kconfig/patches/08-make-write-deps.patch
deleted file mode 100644 (file)
index e5a21c3..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
----
- util.c |  117 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
- 1 file changed, 116 insertions(+), 1 deletion(-)
-
-Index: kconfig/util.c
-===================================================================
---- kconfig.orig/util.c
-+++ kconfig/util.c
-@@ -29,6 +29,121 @@
-       return file;
- }
-+static char* br2_symbol_printer(const char * const in)
-+{
-+      ssize_t i, j, len = strlen(in);
-+      char *ret;
-+      if (len < 1)
-+              return NULL;
-+      ret = malloc(len+1);
-+      if (!ret) {
-+              printf("Out of memory!");
-+              exit(1);
-+      }
-+      memset(ret, 0, len+1);
-+      i = j = 0;
-+      if (strncmp("BR2_", in, 4) == 0)
-+              i += 4;
-+      if (strncmp("PACKAGE_", in + i, 8) == 0)
-+              i += 8;
-+      else if (strncmp("TARGET_", in + i, 7) == 0)
-+              i += 7;
-+      while (i <= len)
-+              ret[j++] = tolower(in[i++]);
-+      return ret;
-+}
-+
-+/* write dependencies of the individual config-symbols */
-+static int write_make_deps(const char *name)
-+{
-+      char *str;
-+      char dir[PATH_MAX+1], buf[PATH_MAX+1], buf2[PATH_MAX+1];
-+      struct menu *menu;
-+      struct symbol *sym;
-+      struct property *prop, *p;
-+      unsigned done;
-+      const char * const name_tmp = "..make.deps.tmp";
-+      FILE *out;
-+      if (!name)
-+              name = ".auto.deps";
-+
-+      strcpy(dir, conf_get_configname());
-+      str = strrchr(dir, '/');
-+      if (str)
-+              str[1] = 0;
-+      else
-+              dir[0] = 0;
-+
-+      sprintf(buf, "%s%s", dir, name_tmp);
-+      out = fopen(buf, "w");
-+      if (!out)
-+              return 1;
-+      fprintf(out, "# ATTENTION! This does not handle 'depends', just 'select'! \n"
-+              "# See support/kconfig/util.c write_make_deps()\n#\n");
-+      menu = &rootmenu;//rootmenu.list;
-+      while (menu) {
-+              sym = menu->sym;
-+              if (!sym) {
-+                      if (!menu_is_visible(menu))
-+                              goto next;
-+              } else if (!(sym->flags & SYMBOL_CHOICE)) {
-+                      sym_calc_value(sym);
-+                      if (sym->type == S_BOOLEAN
-+                          && sym_get_tristate_value(sym) != no) {
-+                          done = 0;
-+                          for_all_prompts(sym, prop) {
-+                              struct expr *e;
-+//printf("\nname=%s\n", sym->name);
-+                              for_all_properties(sym, p, P_SELECT) {
-+                                  e = p->expr;
-+                                  if (e && e->left.sym->name) {
-+                                      if (!done) {
-+                                          fprintf(out, "%s: $(BASE_TARGETS)", br2_symbol_printer(sym->name));
-+                                          done = 1;
-+                                      }
-+//printf("SELECTS %s\n",e->left.sym->name);
-+                                      fprintf(out, " %s",br2_symbol_printer(e->left.sym->name));
-+                                  }
-+                              }
-+                              if (done)
-+                                  fprintf(out, "\n");
-+#if 0
-+                              e = sym->rev_dep.expr;
-+                              if (e && e->type == E_SYMBOL
-+                                      && e->left.sym->name) {
-+                                  fprintf(out, "%s: %s", br2_symbol_printer(e->left.sym->name),
-+                                              br2_symbol_printer(sym->name));
-+printf("%s is Selected BY: %s", sym->name, e->left.sym->name);
-+                              }
-+#endif
-+                          }
-+                      }
-+              }
-+next:
-+              if (menu->list) {
-+                      menu = menu->list;
-+                      continue;
-+              }
-+              if (menu->next)
-+                      menu = menu->next;
-+              else while ((menu = menu->parent)) {
-+                      if (menu->next) {
-+                              menu = menu->next;
-+                              break;
-+                      }
-+              }
-+      }
-+      fclose(out);
-+      sprintf(buf2, "%s%s", dir, name);
-+      rename(buf, buf2);
-+      printf(_("#\n"
-+               "# make dependencies written to %s\n"
-+               "# ATTENTION buildroot devels!\n"
-+               "# See top of this file before playing with this auto-preprequisites!\n"
-+               "#\n"), name);
-+      return 0;
-+}
-+
- /* write a dependency file as used by kbuild to track dependencies */
- int file_write_dep(const char *name)
- {
-@@ -71,7 +186,7 @@
-       fprintf(out, "\n$(deps_config): ;\n");
-       fclose(out);
-       rename("..config.tmp", name);
--      return 0;
-+      return write_make_deps(NULL);
- }
index 3f09673b815d542d841bf0f624c48bf5e350b9d4..3b6eb898f8da767c3f235fda44dc68d4be43ccff 100644 (file)
@@ -2,11 +2,11 @@
  confdata.c |   22 +++++++++++++++++++---
  1 file changed, 19 insertions(+), 3 deletions(-)
 
-Index: config/confdata.c
+Index: kconfig/confdata.c
 ===================================================================
---- config.orig/confdata.c
-+++ config/confdata.c
-@@ -996,7 +996,16 @@
+--- kconfig.orig/confdata.c
++++ kconfig/confdata.c
+@@ -982,7 +982,16 @@
  void conf_set_all_new_symbols(enum conf_def_mode mode)
  {
        struct symbol *sym, *csym;
@@ -24,7 +24,7 @@ Index: config/confdata.c
  
        for_all_symbols(i, sym) {
                if (sym_has_value(sym))
-@@ -1015,8 +1024,15 @@
+@@ -1001,8 +1010,15 @@
                                sym->def[S_DEF_USER].tri = no;
                                break;
                        case def_random:
index 681dce160def933fbc4906b8261a35ee66825b84..badfc91d816996266493b2b46d39a7f8308d2743 100644 (file)
@@ -6,7 +6,7 @@ Index: kconfig/gconf.c
 ===================================================================
 --- kconfig.orig/gconf.c
 +++ kconfig/gconf.c
-@@ -1521,7 +1521,7 @@
+@@ -1525,7 +1525,7 @@
        /* Determine GUI path */
        env = getenv(SRCTREE);
        if (env)
index 9fa6384d315d7dac6ac31a4c4cbfa06cf14d470f..8d76df2e65db5c705b05f30533d842975c1fce48 100644 (file)
@@ -4,10 +4,10 @@
  util.c     |   16 +++++++++++++--
  3 files changed, 61 insertions(+), 18 deletions(-)
 
-Index: config/conf.c
+Index: kconfig/conf.c
 ===================================================================
---- config.orig/conf.c
-+++ config/conf.c
+--- kconfig.orig/conf.c
++++ kconfig/conf.c
 @@ -503,7 +503,6 @@
        }
        name = av[optind];
@@ -16,10 +16,10 @@ Index: config/conf.c
        if (sync_kconfig) {
                name = conf_get_configname();
                if (stat(name, &tmpstat)) {
-Index: config/confdata.c
+Index: kconfig/confdata.c
 ===================================================================
---- config.orig/confdata.c
-+++ config/confdata.c
+--- kconfig.orig/confdata.c
++++ kconfig/confdata.c
 @@ -71,9 +71,7 @@
  
  const char *conf_get_autoconfig_name(void)
@@ -31,8 +31,8 @@ Index: config/confdata.c
  }
  
  static char *conf_expand_value(const char *in)
-@@ -565,6 +563,9 @@
-       int use_timestamp = 1;
+@@ -563,6 +561,9 @@
+       char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1];
        char *env;
  
 +      if (!name)
@@ -41,7 +41,7 @@ Index: config/confdata.c
        dirname[0] = 0;
        if (name && name[0]) {
                struct stat st;
-@@ -671,6 +672,7 @@
+@@ -661,6 +662,7 @@
  {
        const char *name;
        char path[PATH_MAX+1];
@@ -49,7 +49,7 @@ Index: config/confdata.c
        char *s, *d, c;
        struct symbol *sym;
        struct stat sb;
-@@ -679,8 +681,20 @@
+@@ -669,8 +671,20 @@
        name = conf_get_autoconfig_name();
        conf_read_simple(name, S_DEF_AUTO);
  
@@ -72,7 +72,7 @@ Index: config/confdata.c
  
        res = 0;
        for_all_symbols(i, sym) {
-@@ -773,9 +787,11 @@
+@@ -763,9 +777,11 @@
                close(fd);
        }
  out:
@@ -87,9 +87,9 @@ Index: config/confdata.c
        return res;
  }
  
-@@ -787,25 +803,38 @@
+@@ -776,25 +792,38 @@
+       const char *name;
        FILE *out, *tristate, *out_h;
-       time_t now;
        int i;
 +      char dir[PATH_MAX+1], buf[PATH_MAX+1];
 +      char *s;
@@ -130,7 +130,7 @@ Index: config/confdata.c
        if (!out_h) {
                fclose(out);
                fclose(tristate);
-@@ -885,19 +914,22 @@
+@@ -871,19 +900,22 @@
        name = getenv("KCONFIG_AUTOHEADER");
        if (!name)
                name = "include/generated/autoconf.h";
@@ -156,11 +156,11 @@ Index: config/confdata.c
                return 1;
  
        return 0;
-Index: config/util.c
+Index: kconfig/util.c
 ===================================================================
---- config.orig/util.c
-+++ config/util.c
-@@ -147,6 +147,8 @@
+--- kconfig.orig/util.c
++++ kconfig/util.c
+@@ -32,6 +32,8 @@
  /* write a dependency file as used by kbuild to track dependencies */
  int file_write_dep(const char *name)
  {
@@ -169,7 +169,7 @@ Index: config/util.c
        struct symbol *sym, *env_sym;
        struct expr *e;
        struct file *file;
-@@ -154,7 +156,16 @@
+@@ -39,7 +41,16 @@
  
        if (!name)
                name = ".kconfig.d";
@@ -187,13 +187,13 @@ Index: config/util.c
        if (!out)
                return 1;
        fprintf(out, "deps_config := \\\n");
-@@ -185,7 +196,8 @@
+@@ -70,7 +81,8 @@
  
        fprintf(out, "\n$(deps_config): ;\n");
        fclose(out);
 -      rename("..config.tmp", name);
 +      sprintf(buf2, "%s%s", dir, name);
 +      rename(buf, buf2);
-       return write_make_deps(NULL);
+       return 0;
  }
  
index defdf58996bf04bdecccd51e76189c271e0ae16f..573911bdd342e45a7515afeafa5541047511381e 100644 (file)
@@ -1,9 +1,7 @@
 01-kconfig-kernel-to-buildroot.patch
 02-cpp-comments-to-c-comments.patch
 03-change-config-option-prefix.patch
-05-really-clean-everything.patch
 06-br-build-system-integration.patch
-08-make-write-deps.patch
 09-implement-kconfig-probability.patch
 10-br-build-system.patch
 11-use-mktemp-for-lxdialog.patch
index 06dd2e33581de5de81863bd1b74b2fb7100af5ed..c2796b866f8f14a37453f409429b900e1f11ba44 100644 (file)
@@ -1489,8 +1489,7 @@ void ConfigMainWindow::saveConfigAs(void)
        QString s = Q3FileDialog::getSaveFileName(conf_get_configname(), NULL, this);
        if (s.isNull())
                return;
-       if (conf_write(QFile::encodeName(s)))
-               QMessageBox::information(this, "qconf", _("Unable to save configuration!"));
+       saveConfig();
 }
 
 void ConfigMainWindow::searchConfig(void)
@@ -1643,7 +1642,7 @@ void ConfigMainWindow::closeEvent(QCloseEvent* e)
        mb.setButtonText(QMessageBox::Cancel, _("Cancel Exit"));
        switch (mb.exec()) {
        case QMessageBox::Yes:
-               conf_write(NULL);
+               saveConfig();
        case QMessageBox::No:
                e->accept();
                break;
index fd81fc33d6338858fc8352c82034937f26010ce8..a4fe923c01315205e3038b3da5b3514c6d134291 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 #
-# Copywrite 2005-2009 - Steven Rostedt
+# Copyright 2005-2009 - Steven Rostedt
 # Licensed under the terms of the GNU GPL License version 2
 #
 #  It's simple enough to figure out how this works.
index 8a5efaa172f708dfc84c446eca61688c609e867c..6edd8a3d12c950419b7b6c513868f2a68b8b5a13 100644 (file)
@@ -29,121 +29,6 @@ struct file *file_lookup(const char *name)
        return file;
 }
 
-static char* br2_symbol_printer(const char * const in)
-{
-       ssize_t i, j, len = strlen(in);
-       char *ret;
-       if (len < 1)
-               return NULL;
-       ret = malloc(len+1);
-       if (!ret) {
-               printf("Out of memory!");
-               exit(1);
-       }
-       memset(ret, 0, len+1);
-       i = j = 0;
-       if (strncmp("BR2_", in, 4) == 0)
-               i += 4;
-       if (strncmp("PACKAGE_", in + i, 8) == 0)
-               i += 8;
-       else if (strncmp("TARGET_", in + i, 7) == 0)
-               i += 7;
-       while (i <= len)
-               ret[j++] = tolower(in[i++]);
-       return ret;
-}
-
-/* write dependencies of the individual config-symbols */
-static int write_make_deps(const char *name)
-{
-       char *str;
-       char dir[PATH_MAX+1], buf[PATH_MAX+1], buf2[PATH_MAX+1];
-       struct menu *menu;
-       struct symbol *sym;
-       struct property *prop, *p;
-       unsigned done;
-       const char * const name_tmp = "..make.deps.tmp";
-       FILE *out;
-       if (!name)
-               name = ".auto.deps";
-
-       strcpy(dir, conf_get_configname());
-       str = strrchr(dir, '/');
-       if (str)
-               str[1] = 0;
-       else
-               dir[0] = 0;
-
-       sprintf(buf, "%s%s", dir, name_tmp);
-       out = fopen(buf, "w");
-       if (!out)
-               return 1;
-       fprintf(out, "# ATTENTION! This does not handle 'depends', just 'select'! \n"
-               "# See support/kconfig/util.c write_make_deps()\n#\n");
-       menu = &rootmenu;//rootmenu.list;
-       while (menu) {
-               sym = menu->sym;
-               if (!sym) {
-                       if (!menu_is_visible(menu))
-                               goto next;
-               } else if (!(sym->flags & SYMBOL_CHOICE)) {
-                       sym_calc_value(sym);
-                       if (sym->type == S_BOOLEAN
-                           && sym_get_tristate_value(sym) != no) {
-                           done = 0;
-                           for_all_prompts(sym, prop) {
-                               struct expr *e;
-//printf("\nname=%s\n", sym->name);
-                               for_all_properties(sym, p, P_SELECT) {
-                                   e = p->expr;
-                                   if (e && e->left.sym->name) {
-                                       if (!done) {
-                                           fprintf(out, "%s: $(BASE_TARGETS)", br2_symbol_printer(sym->name));
-                                           done = 1;
-                                       }
-//printf("SELECTS %s\n",e->left.sym->name);
-                                       fprintf(out, " %s",br2_symbol_printer(e->left.sym->name));
-                                   }
-                               }
-                               if (done)
-                                   fprintf(out, "\n");
-#if 0
-                               e = sym->rev_dep.expr;
-                               if (e && e->type == E_SYMBOL
-                                       && e->left.sym->name) {
-                                   fprintf(out, "%s: %s", br2_symbol_printer(e->left.sym->name),
-                                               br2_symbol_printer(sym->name));
-printf("%s is Selected BY: %s", sym->name, e->left.sym->name);
-                               }
-#endif
-                           }
-                       }
-               }
-next:
-               if (menu->list) {
-                       menu = menu->list;
-                       continue;
-               }
-               if (menu->next)
-                       menu = menu->next;
-               else while ((menu = menu->parent)) {
-                       if (menu->next) {
-                               menu = menu->next;
-                               break;
-                       }
-               }
-       }
-       fclose(out);
-       sprintf(buf2, "%s%s", dir, name);
-       rename(buf, buf2);
-       printf(_("#\n"
-                "# make dependencies written to %s\n"
-                "# ATTENTION buildroot devels!\n"
-                "# See top of this file before playing with this auto-preprequisites!\n"
-                "#\n"), name);
-       return 0;
-}
-
 /* write a dependency file as used by kbuild to track dependencies */
 int file_write_dep(const char *name)
 {
@@ -198,7 +83,7 @@ int file_write_dep(const char *name)
        fclose(out);
        sprintf(buf2, "%s%s", dir, name);
        rename(buf, buf2);
-       return write_make_deps(NULL);
+       return 0;
 }
 
 
index 3dbaec185cc486d183ed5ba87cfe848635e4b968..b22f884f90221650ed46ef4cf509bf6a3b33170e 100644 (file)
@@ -294,11 +294,11 @@ void zconf_initscan(const char *name)
 
        current_file = file_lookup(name);
        current_file->lineno = 1;
-       current_file->flags = FILE_BUSY;
 }
 
 void zconf_nextfile(const char *name)
 {
+       struct file *iter;
        struct file *file = file_lookup(name);
        struct buffer *buf = malloc(sizeof(*buf));
        memset(buf, 0, sizeof(*buf));
@@ -314,18 +314,25 @@ void zconf_nextfile(const char *name)
        buf->parent = current_buf;
        current_buf = buf;
 
-       if (file->flags & FILE_BUSY) {
-               printf("%s:%d: do not source '%s' from itself\n",
-                      zconf_curname(), zconf_lineno(), name);
-               exit(1);
-       }
-       if (file->flags & FILE_SCANNED) {
-               printf("%s:%d: file '%s' is already sourced from '%s'\n",
-                      zconf_curname(), zconf_lineno(), name,
-                      file->parent->name);
-               exit(1);
+       for (iter = current_file->parent; iter; iter = iter->parent ) {
+               if (!strcmp(current_file->name,iter->name) ) {
+                       printf("%s:%d: recursive inclusion detected. "
+                              "Inclusion path:\n  current file : '%s'\n",
+                              zconf_curname(), zconf_lineno(),
+                              zconf_curname());
+                       iter = current_file->parent;
+                       while (iter && \
+                              strcmp(iter->name,current_file->name)) {
+                               printf("  included from: '%s:%d'\n",
+                                      iter->name, iter->lineno-1);
+                               iter = iter->parent;
+                       }
+                       if (iter)
+                               printf("  included from: '%s:%d'\n",
+                                      iter->name, iter->lineno+1);
+                       exit(1);
+               }
        }
-       file->flags |= FILE_BUSY;
        file->lineno = 1;
        file->parent = current_file;
        current_file = file;
@@ -335,8 +342,6 @@ static void zconf_endfile(void)
 {
        struct buffer *parent;
 
-       current_file->flags |= FILE_SCANNED;
-       current_file->flags &= ~FILE_BUSY;
        current_file = current_file->parent;
 
        parent = current_buf->parent;