Setting tag linux-2.6-27-38
[linux-2.6.git] / linux-2.6-100-build-nonintconfig.patch
1 diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
2 index 32e8c5a..8020453 100644
3 --- a/scripts/kconfig/Makefile
4 +++ b/scripts/kconfig/Makefile
5 @@ -24,6 +24,11 @@ oldconfig: $(obj)/conf
6  silentoldconfig: $(obj)/conf
7         $< -s $(Kconfig)
8  
9 +nonint_oldconfig: $(obj)/conf
10 +       $< -b $(Kconfig)
11 +loose_nonint_oldconfig: $(obj)/conf
12 +       $< -B $(Kconfig)
13 +
14  # Create new linux.pot file
15  # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
16  # The symlink is used to repair a deficiency in arch/um
17 diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
18 index fda6313..ed33b66 100644
19 --- a/scripts/kconfig/conf.c
20 +++ b/scripts/kconfig/conf.c
21 @@ -22,6 +22,8 @@
22         ask_all,
23         ask_new,
24         ask_silent,
25 +       dont_ask,
26 +       dont_ask_dont_tell,
27         set_default,
28         set_yes,
29         set_mod,
30 @@ -39,6 +41,8 @@
31  
32  static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n");
33  
34 +static int return_value = 0;
35 +
36  static const char *get_help(struct menu *menu)
37  {
38         if (menu_has_help(menu))
39 @@ -359,7 +363,10 @@
40  
41                 switch (prop->type) {
42                 case P_MENU:
43 -                       if (input_mode == ask_silent && rootEntry != menu) {
44 +                       if ((input_mode == ask_silent ||
45 +                            input_mode == dont_ask ||
46 +                            input_mode == dont_ask_dont_tell) &&
47 +                           rootEntry != menu) {
48                                 check_conf(menu);
49                                 return;
50                         }
51 @@ -417,12 +424,21 @@
52         if (sym && !sym_has_value(sym)) {
53                 if (sym_is_changable(sym) ||
54                     (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) {
55 +                       if (input_mode == dont_ask ||
56 +                           input_mode == dont_ask_dont_tell) {
57 +                               if (input_mode == dont_ask &&
58 +                                   sym->name && !sym_is_choice_value(sym)) {
59 +                                       fprintf(stderr,"CONFIG_%s\n",sym->name);
60 +                                       ++return_value;
61 +                               }
62 +                       } else {
63                         if (!conf_cnt++)
64                                 printf(_("*\n* Restart config...\n*\n"));
65                         rootEntry = menu_get_parent_menu(menu);
66                         conf(rootEntry);
67                 }
68         }
69 +       }
70  
71         for (child = menu->list; child; child = child->next)
72                 check_conf(child);
73 @@ -438,7 +454,7 @@
74         bindtextdomain(PACKAGE, LOCALEDIR);
75         textdomain(PACKAGE);
76  
77 -       while ((opt = getopt(ac, av, "osdD:nmyrh")) != -1) {
78 +       while ((opt = getopt(ac, av, "osbBdD:nmyrh")) != -1) {
79                 switch (opt) {
80                 case 'o':
81                         input_mode = ask_silent;
82 @@ -447,6 +463,12 @@
83                         input_mode = ask_silent;
84                         sync_kconfig = 1;
85                         break;
86 +               case 'b':
87 +                       input_mode = dont_ask;
88 +                       break;
89 +               case 'B':
90 +                       input_mode = dont_ask_dont_tell;
91 +                       break;
92                 case 'd':
93                         input_mode = set_default;
94                         break;
95 @@ -510,6 +532,8 @@
96         case ask_silent:
97         case ask_all:
98         case ask_new:
99 +       case dont_ask:
100 +       case dont_ask_dont_tell:
101                 conf_read(NULL);
102                 break;
103         case set_no:
104 @@ -571,12 +595,16 @@
105                 conf(&rootmenu);
106                 input_mode = ask_silent;
107                 /* fall through */
108 +       case dont_ask:
109 +       case dont_ask_dont_tell:
110         case ask_silent:
111                 /* Update until a loop caused no more changes */
112                 do {
113                         conf_cnt = 0;
114                         check_conf(&rootmenu);
115 -               } while (conf_cnt);
116 +               } while (conf_cnt &&
117 +                        (input_mode != dont_ask &&
118 +                         input_mode != dont_ask_dont_tell));
119                 break;
120         }
121  
122 @@ -598,5 +626,5 @@
123                         exit(1);
124                 }
125         }
126 -       return 0;
127 +       return return_value;
128  }