aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig')
-rw-r--r--scripts/kconfig/Makefile12
-rw-r--r--scripts/kconfig/conf.c25
2 files changed, 25 insertions, 12 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 77d53999ffb9..3091794e9354 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -76,11 +76,17 @@ PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig
76allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf 76allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf
77 $< --$@ $(Kconfig) 77 $< --$@ $(Kconfig)
78 78
79PHONY += listnewconfig oldnoconfig savedefconfig defconfig 79PHONY += listnewconfig olddefconfig oldnoconfig savedefconfig defconfig
80 80
81listnewconfig oldnoconfig: $(obj)/conf 81listnewconfig olddefconfig: $(obj)/conf
82 $< --$@ $(Kconfig) 82 $< --$@ $(Kconfig)
83 83
84# oldnoconfig is an alias of olddefconfig, because people already are dependent
85# on its behavior(sets new symbols to their default value but not 'n') with the
86# counter-intuitive name.
87oldnoconfig: $(obj)/conf
88 $< --olddefconfig $(Kconfig)
89
84savedefconfig: $(obj)/conf 90savedefconfig: $(obj)/conf
85 $< --$@=defconfig $(Kconfig) 91 $< --$@=defconfig $(Kconfig)
86 92
@@ -114,7 +120,7 @@ help:
114 @echo ' alldefconfig - New config with all symbols set to default' 120 @echo ' alldefconfig - New config with all symbols set to default'
115 @echo ' randconfig - New config with random answer to all options' 121 @echo ' randconfig - New config with random answer to all options'
116 @echo ' listnewconfig - List new options' 122 @echo ' listnewconfig - List new options'
117 @echo ' oldnoconfig - Same as silentoldconfig but sets new symbols to their default value' 123 @echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value'
118 124
119# lxdialog stuff 125# lxdialog stuff
120check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh 126check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 6875680a8db2..4da3b4adfad2 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -32,7 +32,7 @@ enum input_mode {
32 defconfig, 32 defconfig,
33 savedefconfig, 33 savedefconfig,
34 listnewconfig, 34 listnewconfig,
35 oldnoconfig, 35 olddefconfig,
36} input_mode = oldaskconfig; 36} input_mode = oldaskconfig;
37 37
38static int indent = 1; 38static int indent = 1;
@@ -365,7 +365,7 @@ static void conf(struct menu *menu)
365 case P_MENU: 365 case P_MENU:
366 if ((input_mode == silentoldconfig || 366 if ((input_mode == silentoldconfig ||
367 input_mode == listnewconfig || 367 input_mode == listnewconfig ||
368 input_mode == oldnoconfig) && 368 input_mode == olddefconfig) &&
369 rootEntry != menu) { 369 rootEntry != menu) {
370 check_conf(menu); 370 check_conf(menu);
371 return; 371 return;
@@ -429,7 +429,7 @@ static void check_conf(struct menu *menu)
429 if (sym->name && !sym_is_choice_value(sym)) { 429 if (sym->name && !sym_is_choice_value(sym)) {
430 printf("%s%s\n", CONFIG_, sym->name); 430 printf("%s%s\n", CONFIG_, sym->name);
431 } 431 }
432 } else if (input_mode != oldnoconfig) { 432 } else if (input_mode != olddefconfig) {
433 if (!conf_cnt++) 433 if (!conf_cnt++)
434 printf(_("*\n* Restart config...\n*\n")); 434 printf(_("*\n* Restart config...\n*\n"));
435 rootEntry = menu_get_parent_menu(menu); 435 rootEntry = menu_get_parent_menu(menu);
@@ -454,7 +454,13 @@ static struct option long_opts[] = {
454 {"alldefconfig", no_argument, NULL, alldefconfig}, 454 {"alldefconfig", no_argument, NULL, alldefconfig},
455 {"randconfig", no_argument, NULL, randconfig}, 455 {"randconfig", no_argument, NULL, randconfig},
456 {"listnewconfig", no_argument, NULL, listnewconfig}, 456 {"listnewconfig", no_argument, NULL, listnewconfig},
457 {"oldnoconfig", no_argument, NULL, oldnoconfig}, 457 {"olddefconfig", no_argument, NULL, olddefconfig},
458 /*
459 * oldnoconfig is an alias of olddefconfig, because people already
460 * are dependent on its behavior(sets new symbols to their default
461 * value but not 'n') with the counter-intuitive name.
462 */
463 {"oldnoconfig", no_argument, NULL, olddefconfig},
458 {NULL, 0, NULL, 0} 464 {NULL, 0, NULL, 0}
459}; 465};
460 466
@@ -467,7 +473,8 @@ static void conf_usage(const char *progname)
467 printf(" --oldaskconfig Start a new configuration using a line-oriented program\n"); 473 printf(" --oldaskconfig Start a new configuration using a line-oriented program\n");
468 printf(" --oldconfig Update a configuration using a provided .config as base\n"); 474 printf(" --oldconfig Update a configuration using a provided .config as base\n");
469 printf(" --silentoldconfig Same as oldconfig, but quietly, additionally update deps\n"); 475 printf(" --silentoldconfig Same as oldconfig, but quietly, additionally update deps\n");
470 printf(" --oldnoconfig Same as silentoldconfig but sets new symbols to their default value\n"); 476 printf(" --olddefconfig Same as silentoldconfig but sets new symbols to their default value\n");
477 printf(" --oldnoconfig An alias of olddefconfig\n");
471 printf(" --defconfig <file> New config with default defined in <file>\n"); 478 printf(" --defconfig <file> New config with default defined in <file>\n");
472 printf(" --savedefconfig <file> Save the minimal current configuration to <file>\n"); 479 printf(" --savedefconfig <file> Save the minimal current configuration to <file>\n");
473 printf(" --allnoconfig New config where all options are answered with no\n"); 480 printf(" --allnoconfig New config where all options are answered with no\n");
@@ -520,7 +527,7 @@ int main(int ac, char **av)
520 case allmodconfig: 527 case allmodconfig:
521 case alldefconfig: 528 case alldefconfig:
522 case listnewconfig: 529 case listnewconfig:
523 case oldnoconfig: 530 case olddefconfig:
524 break; 531 break;
525 case '?': 532 case '?':
526 conf_usage(progname); 533 conf_usage(progname);
@@ -565,7 +572,7 @@ int main(int ac, char **av)
565 case oldaskconfig: 572 case oldaskconfig:
566 case oldconfig: 573 case oldconfig:
567 case listnewconfig: 574 case listnewconfig:
568 case oldnoconfig: 575 case olddefconfig:
569 conf_read(NULL); 576 conf_read(NULL);
570 break; 577 break;
571 case allnoconfig: 578 case allnoconfig:
@@ -645,7 +652,7 @@ int main(int ac, char **av)
645 /* fall through */ 652 /* fall through */
646 case oldconfig: 653 case oldconfig:
647 case listnewconfig: 654 case listnewconfig:
648 case oldnoconfig: 655 case olddefconfig:
649 case silentoldconfig: 656 case silentoldconfig:
650 /* Update until a loop caused no more changes */ 657 /* Update until a loop caused no more changes */
651 do { 658 do {
@@ -653,7 +660,7 @@ int main(int ac, char **av)
653 check_conf(&rootmenu); 660 check_conf(&rootmenu);
654 } while (conf_cnt && 661 } while (conf_cnt &&
655 (input_mode != listnewconfig && 662 (input_mode != listnewconfig &&
656 input_mode != oldnoconfig)); 663 input_mode != olddefconfig));
657 break; 664 break;
658 } 665 }
659 666