diff options
-rw-r--r-- | CREDITS | 4 | ||||
-rw-r--r-- | Documentation/kbuild/kconfig-language.txt | 32 | ||||
-rw-r--r-- | Documentation/kbuild/kconfig.txt | 5 | ||||
-rw-r--r-- | MAINTAINERS | 5 | ||||
-rw-r--r-- | scripts/kconfig/Makefile | 38 | ||||
-rw-r--r-- | scripts/kconfig/confdata.c | 20 | ||||
-rw-r--r-- | scripts/kconfig/expr.h | 4 | ||||
-rw-r--r-- | scripts/kconfig/gconf.c | 12 | ||||
-rw-r--r-- | scripts/kconfig/lex.zconf.c_shipped | 33 | ||||
-rw-r--r-- | scripts/kconfig/nconf.c | 14 | ||||
-rw-r--r-- | scripts/kconfig/qconf.cc | 5 | ||||
-rw-r--r-- | scripts/kconfig/zconf.l | 33 |
12 files changed, 118 insertions, 87 deletions
@@ -3917,6 +3917,10 @@ S: Flandernstrasse 101 | |||
3917 | S: D-73732 Esslingen | 3917 | S: D-73732 Esslingen |
3918 | S: Germany | 3918 | S: Germany |
3919 | 3919 | ||
3920 | N: Roman Zippel | ||
3921 | E: zippel@linux-m68k.org | ||
3922 | D: AFFS and HFS filesystems, m68k maintainer, new kernel configuration in 2.5 | ||
3923 | |||
3920 | N: Leonard N. Zubkoff | 3924 | N: Leonard N. Zubkoff |
3921 | W: http://www.dandelion.com/Linux/ | 3925 | W: http://www.dandelion.com/Linux/ |
3922 | D: BusLogic SCSI driver | 3926 | D: BusLogic SCSI driver |
diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt index b507d61fd41c..44e2649fbb29 100644 --- a/Documentation/kbuild/kconfig-language.txt +++ b/Documentation/kbuild/kconfig-language.txt | |||
@@ -113,6 +113,13 @@ applicable everywhere (see syntax). | |||
113 | That will limit the usefulness but on the other hand avoid | 113 | That will limit the usefulness but on the other hand avoid |
114 | the illegal configurations all over. | 114 | the illegal configurations all over. |
115 | 115 | ||
116 | - limiting menu display: "visible if" <expr> | ||
117 | This attribute is only applicable to menu blocks, if the condition is | ||
118 | false, the menu block is not displayed to the user (the symbols | ||
119 | contained there can still be selected by other symbols, though). It is | ||
120 | similar to a conditional "prompt" attribude for individual menu | ||
121 | entries. Default value of "visible" is true. | ||
122 | |||
116 | - numerical ranges: "range" <symbol> <symbol> ["if" <expr>] | 123 | - numerical ranges: "range" <symbol> <symbol> ["if" <expr>] |
117 | This allows to limit the range of possible input values for int | 124 | This allows to limit the range of possible input values for int |
118 | and hex symbols. The user can only input a value which is larger than | 125 | and hex symbols. The user can only input a value which is larger than |
@@ -303,7 +310,8 @@ menu: | |||
303 | "endmenu" | 310 | "endmenu" |
304 | 311 | ||
305 | This defines a menu block, see "Menu structure" above for more | 312 | This defines a menu block, see "Menu structure" above for more |
306 | information. The only possible options are dependencies. | 313 | information. The only possible options are dependencies and "visible" |
314 | attributes. | ||
307 | 315 | ||
308 | if: | 316 | if: |
309 | 317 | ||
@@ -381,3 +389,25 @@ config FOO | |||
381 | 389 | ||
382 | limits FOO to module (=m) or disabled (=n). | 390 | limits FOO to module (=m) or disabled (=n). |
383 | 391 | ||
392 | Kconfig symbol existence | ||
393 | ~~~~~~~~~~~~~~~~~~~~~~~~ | ||
394 | The following two methods produce the same kconfig symbol dependencies | ||
395 | but differ greatly in kconfig symbol existence (production) in the | ||
396 | generated config file. | ||
397 | |||
398 | case 1: | ||
399 | |||
400 | config FOO | ||
401 | tristate "about foo" | ||
402 | depends on BAR | ||
403 | |||
404 | vs. case 2: | ||
405 | |||
406 | if BAR | ||
407 | config FOO | ||
408 | tristate "about foo" | ||
409 | endif | ||
410 | |||
411 | In case 1, the symbol FOO will always exist in the config file (given | ||
412 | no other dependencies). In case 2, the symbol FOO will only exist in | ||
413 | the config file if BAR is enabled. | ||
diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt index cca46b1a0f6c..c313d71324b4 100644 --- a/Documentation/kbuild/kconfig.txt +++ b/Documentation/kbuild/kconfig.txt | |||
@@ -48,11 +48,6 @@ KCONFIG_OVERWRITECONFIG | |||
48 | If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not | 48 | If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not |
49 | break symlinks when .config is a symlink to somewhere else. | 49 | break symlinks when .config is a symlink to somewhere else. |
50 | 50 | ||
51 | KCONFIG_NOTIMESTAMP | ||
52 | -------------------------------------------------- | ||
53 | If this environment variable exists and is non-null, the timestamp line | ||
54 | in generated .config files is omitted. | ||
55 | |||
56 | ______________________________________________________________________ | 51 | ______________________________________________________________________ |
57 | Environment variables for '{allyes/allmod/allno/rand}config' | 52 | Environment variables for '{allyes/allmod/allno/rand}config' |
58 | 53 | ||
diff --git a/MAINTAINERS b/MAINTAINERS index a26c9ee7703d..43494463b57d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -3597,10 +3597,9 @@ F: Documentation/hwmon/k8temp | |||
3597 | F: drivers/hwmon/k8temp.c | 3597 | F: drivers/hwmon/k8temp.c |
3598 | 3598 | ||
3599 | KCONFIG | 3599 | KCONFIG |
3600 | M: Roman Zippel <zippel@linux-m68k.org> | 3600 | M: Michal Marek <mmarek@suse.cz> |
3601 | L: linux-kbuild@vger.kernel.org | 3601 | L: linux-kbuild@vger.kernel.org |
3602 | Q: http://patchwork.kernel.org/project/linux-kbuild/list/ | 3602 | S: Odd Fixes |
3603 | S: Maintained | ||
3604 | F: Documentation/kbuild/kconfig-language.txt | 3603 | F: Documentation/kbuild/kconfig-language.txt |
3605 | F: scripts/kconfig/ | 3604 | F: scripts/kconfig/ |
3606 | 3605 | ||
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 368ae306aee4..faa9a4701b6f 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
@@ -77,14 +77,15 @@ localyesconfig: $(obj)/streamline_config.pl $(obj)/conf | |||
77 | # The symlink is used to repair a deficiency in arch/um | 77 | # The symlink is used to repair a deficiency in arch/um |
78 | update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h | 78 | update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h |
79 | $(Q)echo " GEN config" | 79 | $(Q)echo " GEN config" |
80 | $(Q)xgettext --default-domain=linux \ | 80 | $(Q)xgettext --default-domain=linux \ |
81 | --add-comments --keyword=_ --keyword=N_ \ | 81 | --add-comments --keyword=_ --keyword=N_ \ |
82 | --from-code=UTF-8 \ | 82 | --from-code=UTF-8 \ |
83 | --files-from=scripts/kconfig/POTFILES.in \ | 83 | --files-from=$(srctree)/scripts/kconfig/POTFILES.in \ |
84 | --directory=$(srctree) --directory=$(objtree) \ | ||
84 | --output $(obj)/config.pot | 85 | --output $(obj)/config.pot |
85 | $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot | 86 | $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot |
86 | $(Q)ln -fs Kconfig.i386 arch/um/Kconfig.arch | 87 | $(Q)ln -fs Kconfig.x86 arch/um/Kconfig |
87 | $(Q)(for i in `ls arch/*/Kconfig`; \ | 88 | $(Q)(for i in `ls $(srctree)/arch/*/Kconfig`; \ |
88 | do \ | 89 | do \ |
89 | echo " GEN $$i"; \ | 90 | echo " GEN $$i"; \ |
90 | $(obj)/kxgettext $$i \ | 91 | $(obj)/kxgettext $$i \ |
@@ -92,7 +93,7 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h | |||
92 | done ) | 93 | done ) |
93 | $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ | 94 | $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ |
94 | --output $(obj)/linux.pot | 95 | --output $(obj)/linux.pot |
95 | $(Q)rm -f arch/um/Kconfig.arch | 96 | $(Q)rm -f $(srctree)/arch/um/Kconfig |
96 | $(Q)rm -f $(obj)/config.pot | 97 | $(Q)rm -f $(obj)/config.pot |
97 | 98 | ||
98 | PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig | 99 | PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig |
@@ -168,8 +169,11 @@ conf-objs := conf.o zconf.tab.o | |||
168 | mconf-objs := mconf.o zconf.tab.o $(lxdialog) | 169 | mconf-objs := mconf.o zconf.tab.o $(lxdialog) |
169 | nconf-objs := nconf.o zconf.tab.o nconf.gui.o | 170 | nconf-objs := nconf.o zconf.tab.o nconf.gui.o |
170 | kxgettext-objs := kxgettext.o zconf.tab.o | 171 | kxgettext-objs := kxgettext.o zconf.tab.o |
172 | qconf-cxxobjs := qconf.o | ||
173 | qconf-objs := kconfig_load.o zconf.tab.o | ||
174 | gconf-objs := gconf.o kconfig_load.o zconf.tab.o | ||
171 | 175 | ||
172 | hostprogs-y := conf qconf gconf kxgettext | 176 | hostprogs-y := conf |
173 | 177 | ||
174 | ifeq ($(MAKECMDGOALS),nconfig) | 178 | ifeq ($(MAKECMDGOALS),nconfig) |
175 | hostprogs-y += nconf | 179 | hostprogs-y += nconf |
@@ -179,6 +183,10 @@ ifeq ($(MAKECMDGOALS),menuconfig) | |||
179 | hostprogs-y += mconf | 183 | hostprogs-y += mconf |
180 | endif | 184 | endif |
181 | 185 | ||
186 | ifeq ($(MAKECMDGOALS),update-po-config) | ||
187 | hostprogs-y += kxgettext | ||
188 | endif | ||
189 | |||
182 | ifeq ($(MAKECMDGOALS),xconfig) | 190 | ifeq ($(MAKECMDGOALS),xconfig) |
183 | qconf-target := 1 | 191 | qconf-target := 1 |
184 | endif | 192 | endif |
@@ -188,16 +196,15 @@ endif | |||
188 | 196 | ||
189 | 197 | ||
190 | ifeq ($(qconf-target),1) | 198 | ifeq ($(qconf-target),1) |
191 | qconf-cxxobjs := qconf.o | 199 | hostprogs-y += qconf |
192 | qconf-objs := kconfig_load.o zconf.tab.o | ||
193 | endif | 200 | endif |
194 | 201 | ||
195 | ifeq ($(gconf-target),1) | 202 | ifeq ($(gconf-target),1) |
196 | gconf-objs := gconf.o kconfig_load.o zconf.tab.o | 203 | hostprogs-y += gconf |
197 | endif | 204 | endif |
198 | 205 | ||
199 | clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \ | 206 | clean-files := lkc_defs.h qconf.moc .tmp_qtcheck .tmp_gtkcheck |
200 | .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h | 207 | clean-files += zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h |
201 | clean-files += mconf qconf gconf nconf | 208 | clean-files += mconf qconf gconf nconf |
202 | clean-files += config.pot linux.pot | 209 | clean-files += config.pot linux.pot |
203 | 210 | ||
@@ -321,11 +328,12 @@ $(obj)/%.moc: $(src)/%.h | |||
321 | $(KC_QT_MOC) -i $< -o $@ | 328 | $(KC_QT_MOC) -i $< -o $@ |
322 | 329 | ||
323 | $(obj)/lkc_defs.h: $(src)/lkc_proto.h | 330 | $(obj)/lkc_defs.h: $(src)/lkc_proto.h |
324 | sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' | 331 | $(Q)sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' |
325 | 332 | ||
326 | # Extract gconf menu items for I18N support | 333 | # Extract gconf menu items for I18N support |
327 | $(obj)/gconf.glade.h: $(obj)/gconf.glade | 334 | $(obj)/gconf.glade.h: $(obj)/gconf.glade |
328 | intltool-extract --type=gettext/glade $(obj)/gconf.glade | 335 | $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \ |
336 | $(obj)/gconf.glade | ||
329 | 337 | ||
330 | ### | 338 | ### |
331 | # The following requires flex/bison/gperf | 339 | # The following requires flex/bison/gperf |
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 61c35bf2d9cb..2bafd9a7c8da 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c | |||
@@ -560,8 +560,6 @@ int conf_write(const char *name) | |||
560 | const char *basename; | 560 | const char *basename; |
561 | const char *str; | 561 | const char *str; |
562 | char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1]; | 562 | char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1]; |
563 | time_t now; | ||
564 | int use_timestamp = 1; | ||
565 | char *env; | 563 | char *env; |
566 | 564 | ||
567 | dirname[0] = 0; | 565 | dirname[0] = 0; |
@@ -598,19 +596,11 @@ int conf_write(const char *name) | |||
598 | if (!out) | 596 | if (!out) |
599 | return 1; | 597 | return 1; |
600 | 598 | ||
601 | time(&now); | ||
602 | env = getenv("KCONFIG_NOTIMESTAMP"); | ||
603 | if (env && *env) | ||
604 | use_timestamp = 0; | ||
605 | |||
606 | fprintf(out, _("#\n" | 599 | fprintf(out, _("#\n" |
607 | "# Automatically generated make config: don't edit\n" | 600 | "# Automatically generated make config: don't edit\n" |
608 | "# %s\n" | 601 | "# %s\n" |
609 | "%s%s" | ||
610 | "#\n"), | 602 | "#\n"), |
611 | rootmenu.prompt->text, | 603 | rootmenu.prompt->text); |
612 | use_timestamp ? "# " : "", | ||
613 | use_timestamp ? ctime(&now) : ""); | ||
614 | 604 | ||
615 | if (!conf_get_changed()) | 605 | if (!conf_get_changed()) |
616 | sym_clear_all_valid(); | 606 | sym_clear_all_valid(); |
@@ -784,7 +774,6 @@ int conf_write_autoconf(void) | |||
784 | const char *str; | 774 | const char *str; |
785 | const char *name; | 775 | const char *name; |
786 | FILE *out, *tristate, *out_h; | 776 | FILE *out, *tristate, *out_h; |
787 | time_t now; | ||
788 | int i; | 777 | int i; |
789 | 778 | ||
790 | sym_clear_all_valid(); | 779 | sym_clear_all_valid(); |
@@ -811,22 +800,19 @@ int conf_write_autoconf(void) | |||
811 | return 1; | 800 | return 1; |
812 | } | 801 | } |
813 | 802 | ||
814 | time(&now); | ||
815 | fprintf(out, "#\n" | 803 | fprintf(out, "#\n" |
816 | "# Automatically generated make config: don't edit\n" | 804 | "# Automatically generated make config: don't edit\n" |
817 | "# %s\n" | 805 | "# %s\n" |
818 | "# %s" | ||
819 | "#\n", | 806 | "#\n", |
820 | rootmenu.prompt->text, ctime(&now)); | 807 | rootmenu.prompt->text); |
821 | fprintf(tristate, "#\n" | 808 | fprintf(tristate, "#\n" |
822 | "# Automatically generated - do not edit\n" | 809 | "# Automatically generated - do not edit\n" |
823 | "\n"); | 810 | "\n"); |
824 | fprintf(out_h, "/*\n" | 811 | fprintf(out_h, "/*\n" |
825 | " * Automatically generated C config: don't edit\n" | 812 | " * Automatically generated C config: don't edit\n" |
826 | " * %s\n" | 813 | " * %s\n" |
827 | " * %s" | ||
828 | " */\n", | 814 | " */\n", |
829 | rootmenu.prompt->text, ctime(&now)); | 815 | rootmenu.prompt->text); |
830 | 816 | ||
831 | for_all_symbols(i, sym) { | 817 | for_all_symbols(i, sym) { |
832 | sym_calc_value(sym); | 818 | sym_calc_value(sym); |
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index 3d238db49764..16bfae2d3217 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h | |||
@@ -20,12 +20,8 @@ struct file { | |||
20 | struct file *parent; | 20 | struct file *parent; |
21 | const char *name; | 21 | const char *name; |
22 | int lineno; | 22 | int lineno; |
23 | int flags; | ||
24 | }; | 23 | }; |
25 | 24 | ||
26 | #define FILE_BUSY 0x0001 | ||
27 | #define FILE_SCANNED 0x0002 | ||
28 | |||
29 | typedef enum tristate { | 25 | typedef enum tristate { |
30 | no, mod, yes | 26 | no, mod, yes |
31 | } tristate; | 27 | } tristate; |
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index 455896164d72..a11d5f7b9eeb 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c | |||
@@ -253,7 +253,7 @@ void init_left_tree(void) | |||
253 | 253 | ||
254 | gtk_tree_view_set_model(view, model1); | 254 | gtk_tree_view_set_model(view, model1); |
255 | gtk_tree_view_set_headers_visible(view, TRUE); | 255 | gtk_tree_view_set_headers_visible(view, TRUE); |
256 | gtk_tree_view_set_rules_hint(view, FALSE); | 256 | gtk_tree_view_set_rules_hint(view, TRUE); |
257 | 257 | ||
258 | column = gtk_tree_view_column_new(); | 258 | column = gtk_tree_view_column_new(); |
259 | gtk_tree_view_append_column(view, column); | 259 | gtk_tree_view_append_column(view, column); |
@@ -298,7 +298,7 @@ void init_right_tree(void) | |||
298 | 298 | ||
299 | gtk_tree_view_set_model(view, model2); | 299 | gtk_tree_view_set_model(view, model2); |
300 | gtk_tree_view_set_headers_visible(view, TRUE); | 300 | gtk_tree_view_set_headers_visible(view, TRUE); |
301 | gtk_tree_view_set_rules_hint(view, FALSE); | 301 | gtk_tree_view_set_rules_hint(view, TRUE); |
302 | 302 | ||
303 | column = gtk_tree_view_column_new(); | 303 | column = gtk_tree_view_column_new(); |
304 | gtk_tree_view_append_column(view, column); | 304 | gtk_tree_view_append_column(view, column); |
@@ -756,7 +756,6 @@ void on_load_clicked(GtkButton * button, gpointer user_data) | |||
756 | void on_single_clicked(GtkButton * button, gpointer user_data) | 756 | void on_single_clicked(GtkButton * button, gpointer user_data) |
757 | { | 757 | { |
758 | view_mode = SINGLE_VIEW; | 758 | view_mode = SINGLE_VIEW; |
759 | gtk_paned_set_position(GTK_PANED(hpaned), 0); | ||
760 | gtk_widget_hide(tree1_w); | 759 | gtk_widget_hide(tree1_w); |
761 | current = &rootmenu; | 760 | current = &rootmenu; |
762 | display_tree_part(); | 761 | display_tree_part(); |
@@ -782,7 +781,6 @@ void on_split_clicked(GtkButton * button, gpointer user_data) | |||
782 | void on_full_clicked(GtkButton * button, gpointer user_data) | 781 | void on_full_clicked(GtkButton * button, gpointer user_data) |
783 | { | 782 | { |
784 | view_mode = FULL_VIEW; | 783 | view_mode = FULL_VIEW; |
785 | gtk_paned_set_position(GTK_PANED(hpaned), 0); | ||
786 | gtk_widget_hide(tree1_w); | 784 | gtk_widget_hide(tree1_w); |
787 | if (tree2) | 785 | if (tree2) |
788 | gtk_tree_store_clear(tree2); | 786 | gtk_tree_store_clear(tree2); |
@@ -1444,6 +1442,12 @@ static void display_tree(struct menu *menu) | |||
1444 | if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT)) | 1442 | if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT)) |
1445 | || (view_mode == FULL_VIEW) | 1443 | || (view_mode == FULL_VIEW) |
1446 | || (view_mode == SPLIT_VIEW))*/ | 1444 | || (view_mode == SPLIT_VIEW))*/ |
1445 | |||
1446 | /* Change paned position if the view is not in 'split mode' */ | ||
1447 | if (view_mode == SINGLE_VIEW || view_mode == FULL_VIEW) { | ||
1448 | gtk_paned_set_position(GTK_PANED(hpaned), 0); | ||
1449 | } | ||
1450 | |||
1447 | if (((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT)) | 1451 | if (((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT)) |
1448 | || (view_mode == FULL_VIEW) | 1452 | || (view_mode == FULL_VIEW) |
1449 | || (view_mode == SPLIT_VIEW)) { | 1453 | || (view_mode == SPLIT_VIEW)) { |
diff --git a/scripts/kconfig/lex.zconf.c_shipped b/scripts/kconfig/lex.zconf.c_shipped index 6eb039718259..d9182916f724 100644 --- a/scripts/kconfig/lex.zconf.c_shipped +++ b/scripts/kconfig/lex.zconf.c_shipped | |||
@@ -2363,11 +2363,11 @@ void zconf_initscan(const char *name) | |||
2363 | 2363 | ||
2364 | current_file = file_lookup(name); | 2364 | current_file = file_lookup(name); |
2365 | current_file->lineno = 1; | 2365 | current_file->lineno = 1; |
2366 | current_file->flags = FILE_BUSY; | ||
2367 | } | 2366 | } |
2368 | 2367 | ||
2369 | void zconf_nextfile(const char *name) | 2368 | void zconf_nextfile(const char *name) |
2370 | { | 2369 | { |
2370 | struct file *iter; | ||
2371 | struct file *file = file_lookup(name); | 2371 | struct file *file = file_lookup(name); |
2372 | struct buffer *buf = malloc(sizeof(*buf)); | 2372 | struct buffer *buf = malloc(sizeof(*buf)); |
2373 | memset(buf, 0, sizeof(*buf)); | 2373 | memset(buf, 0, sizeof(*buf)); |
@@ -2383,18 +2383,25 @@ void zconf_nextfile(const char *name) | |||
2383 | buf->parent = current_buf; | 2383 | buf->parent = current_buf; |
2384 | current_buf = buf; | 2384 | current_buf = buf; |
2385 | 2385 | ||
2386 | if (file->flags & FILE_BUSY) { | 2386 | for (iter = current_file->parent; iter; iter = iter->parent ) { |
2387 | printf("%s:%d: do not source '%s' from itself\n", | 2387 | if (!strcmp(current_file->name,iter->name) ) { |
2388 | zconf_curname(), zconf_lineno(), name); | 2388 | printf("%s:%d: recursive inclusion detected. " |
2389 | exit(1); | 2389 | "Inclusion path:\n current file : '%s'\n", |
2390 | } | 2390 | zconf_curname(), zconf_lineno(), |
2391 | if (file->flags & FILE_SCANNED) { | 2391 | zconf_curname()); |
2392 | printf("%s:%d: file '%s' is already sourced from '%s'\n", | 2392 | iter = current_file->parent; |
2393 | zconf_curname(), zconf_lineno(), name, | 2393 | while (iter && \ |
2394 | file->parent->name); | 2394 | strcmp(iter->name,current_file->name)) { |
2395 | exit(1); | 2395 | printf(" included from: '%s:%d'\n", |
2396 | iter->name, iter->lineno-1); | ||
2397 | iter = iter->parent; | ||
2398 | } | ||
2399 | if (iter) | ||
2400 | printf(" included from: '%s:%d'\n", | ||
2401 | iter->name, iter->lineno+1); | ||
2402 | exit(1); | ||
2403 | } | ||
2396 | } | 2404 | } |
2397 | file->flags |= FILE_BUSY; | ||
2398 | file->lineno = 1; | 2405 | file->lineno = 1; |
2399 | file->parent = current_file; | 2406 | file->parent = current_file; |
2400 | current_file = file; | 2407 | current_file = file; |
@@ -2404,8 +2411,6 @@ static void zconf_endfile(void) | |||
2404 | { | 2411 | { |
2405 | struct buffer *parent; | 2412 | struct buffer *parent; |
2406 | 2413 | ||
2407 | current_file->flags |= FILE_SCANNED; | ||
2408 | current_file->flags &= ~FILE_BUSY; | ||
2409 | current_file = current_file->parent; | 2414 | current_file = current_file->parent; |
2410 | 2415 | ||
2411 | parent = current_buf->parent; | 2416 | parent = current_buf->parent; |
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index db56377393d7..488dd7410787 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c | |||
@@ -373,18 +373,18 @@ static void print_function_line(void) | |||
373 | const int skip = 1; | 373 | const int skip = 1; |
374 | 374 | ||
375 | for (i = 0; i < function_keys_num; i++) { | 375 | for (i = 0; i < function_keys_num; i++) { |
376 | wattrset(main_window, attributes[FUNCTION_HIGHLIGHT]); | 376 | (void) wattrset(main_window, attributes[FUNCTION_HIGHLIGHT]); |
377 | mvwprintw(main_window, LINES-3, offset, | 377 | mvwprintw(main_window, LINES-3, offset, |
378 | "%s", | 378 | "%s", |
379 | function_keys[i].key_str); | 379 | function_keys[i].key_str); |
380 | wattrset(main_window, attributes[FUNCTION_TEXT]); | 380 | (void) wattrset(main_window, attributes[FUNCTION_TEXT]); |
381 | offset += strlen(function_keys[i].key_str); | 381 | offset += strlen(function_keys[i].key_str); |
382 | mvwprintw(main_window, LINES-3, | 382 | mvwprintw(main_window, LINES-3, |
383 | offset, "%s", | 383 | offset, "%s", |
384 | function_keys[i].func); | 384 | function_keys[i].func); |
385 | offset += strlen(function_keys[i].func) + skip; | 385 | offset += strlen(function_keys[i].func) + skip; |
386 | } | 386 | } |
387 | wattrset(main_window, attributes[NORMAL]); | 387 | (void) wattrset(main_window, attributes[NORMAL]); |
388 | } | 388 | } |
389 | 389 | ||
390 | /* help */ | 390 | /* help */ |
@@ -953,16 +953,16 @@ static void show_menu(const char *prompt, const char *instructions, | |||
953 | current_instructions = instructions; | 953 | current_instructions = instructions; |
954 | 954 | ||
955 | clear(); | 955 | clear(); |
956 | wattrset(main_window, attributes[NORMAL]); | 956 | (void) wattrset(main_window, attributes[NORMAL]); |
957 | print_in_middle(stdscr, 1, 0, COLS, | 957 | print_in_middle(stdscr, 1, 0, COLS, |
958 | menu_backtitle, | 958 | menu_backtitle, |
959 | attributes[MAIN_HEADING]); | 959 | attributes[MAIN_HEADING]); |
960 | 960 | ||
961 | wattrset(main_window, attributes[MAIN_MENU_BOX]); | 961 | (void) wattrset(main_window, attributes[MAIN_MENU_BOX]); |
962 | box(main_window, 0, 0); | 962 | box(main_window, 0, 0); |
963 | wattrset(main_window, attributes[MAIN_MENU_HEADING]); | 963 | (void) wattrset(main_window, attributes[MAIN_MENU_HEADING]); |
964 | mvwprintw(main_window, 0, 3, " %s ", prompt); | 964 | mvwprintw(main_window, 0, 3, " %s ", prompt); |
965 | wattrset(main_window, attributes[NORMAL]); | 965 | (void) wattrset(main_window, attributes[NORMAL]); |
966 | 966 | ||
967 | set_menu_items(curses_menu, curses_menu_items); | 967 | set_menu_items(curses_menu, curses_menu_items); |
968 | 968 | ||
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 06dd2e33581d..c2796b866f8f 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc | |||
@@ -1489,8 +1489,7 @@ void ConfigMainWindow::saveConfigAs(void) | |||
1489 | QString s = Q3FileDialog::getSaveFileName(conf_get_configname(), NULL, this); | 1489 | QString s = Q3FileDialog::getSaveFileName(conf_get_configname(), NULL, this); |
1490 | if (s.isNull()) | 1490 | if (s.isNull()) |
1491 | return; | 1491 | return; |
1492 | if (conf_write(QFile::encodeName(s))) | 1492 | saveConfig(); |
1493 | QMessageBox::information(this, "qconf", _("Unable to save configuration!")); | ||
1494 | } | 1493 | } |
1495 | 1494 | ||
1496 | void ConfigMainWindow::searchConfig(void) | 1495 | void ConfigMainWindow::searchConfig(void) |
@@ -1643,7 +1642,7 @@ void ConfigMainWindow::closeEvent(QCloseEvent* e) | |||
1643 | mb.setButtonText(QMessageBox::Cancel, _("Cancel Exit")); | 1642 | mb.setButtonText(QMessageBox::Cancel, _("Cancel Exit")); |
1644 | switch (mb.exec()) { | 1643 | switch (mb.exec()) { |
1645 | case QMessageBox::Yes: | 1644 | case QMessageBox::Yes: |
1646 | conf_write(NULL); | 1645 | saveConfig(); |
1647 | case QMessageBox::No: | 1646 | case QMessageBox::No: |
1648 | e->accept(); | 1647 | e->accept(); |
1649 | break; | 1648 | break; |
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index 3dbaec185cc4..b22f884f9022 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l | |||
@@ -294,11 +294,11 @@ void zconf_initscan(const char *name) | |||
294 | 294 | ||
295 | current_file = file_lookup(name); | 295 | current_file = file_lookup(name); |
296 | current_file->lineno = 1; | 296 | current_file->lineno = 1; |
297 | current_file->flags = FILE_BUSY; | ||
298 | } | 297 | } |
299 | 298 | ||
300 | void zconf_nextfile(const char *name) | 299 | void zconf_nextfile(const char *name) |
301 | { | 300 | { |
301 | struct file *iter; | ||
302 | struct file *file = file_lookup(name); | 302 | struct file *file = file_lookup(name); |
303 | struct buffer *buf = malloc(sizeof(*buf)); | 303 | struct buffer *buf = malloc(sizeof(*buf)); |
304 | memset(buf, 0, sizeof(*buf)); | 304 | memset(buf, 0, sizeof(*buf)); |
@@ -314,18 +314,25 @@ void zconf_nextfile(const char *name) | |||
314 | buf->parent = current_buf; | 314 | buf->parent = current_buf; |
315 | current_buf = buf; | 315 | current_buf = buf; |
316 | 316 | ||
317 | if (file->flags & FILE_BUSY) { | 317 | for (iter = current_file->parent; iter; iter = iter->parent ) { |
318 | printf("%s:%d: do not source '%s' from itself\n", | 318 | if (!strcmp(current_file->name,iter->name) ) { |
319 | zconf_curname(), zconf_lineno(), name); | 319 | printf("%s:%d: recursive inclusion detected. " |
320 | exit(1); | 320 | "Inclusion path:\n current file : '%s'\n", |
321 | } | 321 | zconf_curname(), zconf_lineno(), |
322 | if (file->flags & FILE_SCANNED) { | 322 | zconf_curname()); |
323 | printf("%s:%d: file '%s' is already sourced from '%s'\n", | 323 | iter = current_file->parent; |
324 | zconf_curname(), zconf_lineno(), name, | 324 | while (iter && \ |
325 | file->parent->name); | 325 | strcmp(iter->name,current_file->name)) { |
326 | exit(1); | 326 | printf(" included from: '%s:%d'\n", |
327 | iter->name, iter->lineno-1); | ||
328 | iter = iter->parent; | ||
329 | } | ||
330 | if (iter) | ||
331 | printf(" included from: '%s:%d'\n", | ||
332 | iter->name, iter->lineno+1); | ||
333 | exit(1); | ||
334 | } | ||
327 | } | 335 | } |
328 | file->flags |= FILE_BUSY; | ||
329 | file->lineno = 1; | 336 | file->lineno = 1; |
330 | file->parent = current_file; | 337 | file->parent = current_file; |
331 | current_file = file; | 338 | current_file = file; |
@@ -335,8 +342,6 @@ static void zconf_endfile(void) | |||
335 | { | 342 | { |
336 | struct buffer *parent; | 343 | struct buffer *parent; |
337 | 344 | ||
338 | current_file->flags |= FILE_SCANNED; | ||
339 | current_file->flags &= ~FILE_BUSY; | ||
340 | current_file = current_file->parent; | 345 | current_file = current_file->parent; |
341 | 346 | ||
342 | parent = current_buf->parent; | 347 | parent = current_buf->parent; |