diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-06 21:52:52 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-06 21:52:52 -0500 |
| commit | a84f6aa68e35a911c28e5871c87356dce3607b40 (patch) | |
| tree | 4093b13e359d68ba99c39b0f156124265adb6349 | |
| parent | dede6faac448db4251f8996d7dec6afb5a43726a (diff) | |
| parent | 93072c3ecafcf188390750cc755185f3150736b9 (diff) | |
Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
scripts/kconfig/nconf: add KEY_HOME / KEY_END for dialog_inputbox
scripts/kconfig/nconf: fix editing long strings
scripts/kconfig/nconf: dynamically alloc dialog_input_result
scripts/kconfig/nconf: fix memmove's length arg
scripts/kconfig/nconf: fix typo: unknow => unknown
kconfig: fix set but not used variables
kconfig: handle SIGINT in menuconfig
kconfig: fix __enabled_ macros definition for invisible and un-selected symbols
kconfig: factor code in menu_get_ext_help()
kbuild: Fix help text not displayed in choice option.
kconfig/nconf: nuke unreferenced `nohelp_text'
kconfig/streamline_config.pl: merge local{mod,yes}config
kconfig/streamline_config.pl: use options to determine operating mode
kconfig/streamline_config.pl: directly access LSMOD from the environment
| -rw-r--r-- | scripts/kconfig/Makefile | 28 | ||||
| -rw-r--r-- | scripts/kconfig/confdata.c | 49 | ||||
| -rw-r--r-- | scripts/kconfig/lxdialog/textbox.c | 3 | ||||
| -rw-r--r-- | scripts/kconfig/mconf.c | 86 | ||||
| -rw-r--r-- | scripts/kconfig/menu.c | 13 | ||||
| -rw-r--r-- | scripts/kconfig/nconf.c | 23 | ||||
| -rw-r--r-- | scripts/kconfig/nconf.gui.c | 59 | ||||
| -rw-r--r-- | scripts/kconfig/nconf.h | 2 | ||||
| -rw-r--r-- | scripts/kconfig/streamline_config.pl | 22 |
9 files changed, 173 insertions, 112 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 82d2eb285b70..ba573fe7c74d 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
| @@ -33,17 +33,9 @@ silentoldconfig: $(obj)/conf | |||
| 33 | $(Q)mkdir -p include/generated | 33 | $(Q)mkdir -p include/generated |
| 34 | $< --$@ $(Kconfig) | 34 | $< --$@ $(Kconfig) |
| 35 | 35 | ||
| 36 | # if no path is given, then use src directory to find file | 36 | localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf |
| 37 | ifdef LSMOD | ||
| 38 | LSMOD_F := $(LSMOD) | ||
| 39 | ifeq ($(findstring /,$(LSMOD)),) | ||
| 40 | LSMOD_F := $(objtree)/$(LSMOD) | ||
| 41 | endif | ||
| 42 | endif | ||
| 43 | |||
| 44 | localmodconfig: $(obj)/streamline_config.pl $(obj)/conf | ||
| 45 | $(Q)mkdir -p include/generated | 37 | $(Q)mkdir -p include/generated |
| 46 | $(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config | 38 | $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config |
| 47 | $(Q)if [ -f .config ]; then \ | 39 | $(Q)if [ -f .config ]; then \ |
| 48 | cmp -s .tmp.config .config || \ | 40 | cmp -s .tmp.config .config || \ |
| 49 | (mv -f .config .config.old.1; \ | 41 | (mv -f .config .config.old.1; \ |
| @@ -56,22 +48,6 @@ localmodconfig: $(obj)/streamline_config.pl $(obj)/conf | |||
| 56 | fi | 48 | fi |
| 57 | $(Q)rm -f .tmp.config | 49 | $(Q)rm -f .tmp.config |
| 58 | 50 | ||
| 59 | localyesconfig: $(obj)/streamline_config.pl $(obj)/conf | ||
| 60 | $(Q)mkdir -p include/generated | ||
| 61 | $(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config | ||
| 62 | $(Q)sed -i s/=m/=y/ .tmp.config | ||
| 63 | $(Q)if [ -f .config ]; then \ | ||
| 64 | cmp -s .tmp.config .config || \ | ||
| 65 | (mv -f .config .config.old.1; \ | ||
| 66 | mv -f .tmp.config .config; \ | ||
| 67 | $(obj)/conf --silentoldconfig $(Kconfig); \ | ||
| 68 | mv -f .config.old.1 .config.old) \ | ||
| 69 | else \ | ||
| 70 | mv -f .tmp.config .config; \ | ||
| 71 | $(obj)/conf --silentoldconfig $(Kconfig); \ | ||
| 72 | fi | ||
| 73 | $(Q)rm -f .tmp.config | ||
| 74 | |||
| 75 | # Create new linux.pot file | 51 | # Create new linux.pot file |
| 76 | # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files | 52 | # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files |
| 77 | # The symlink is used to repair a deficiency in arch/um | 53 | # The symlink is used to repair a deficiency in arch/um |
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 59b667cae5f3..5a58965d8800 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c | |||
| @@ -503,17 +503,6 @@ header_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) | |||
| 503 | fprintf(fp, "#define %s%s%s 1\n", | 503 | fprintf(fp, "#define %s%s%s 1\n", |
| 504 | CONFIG_, sym->name, suffix); | 504 | CONFIG_, sym->name, suffix); |
| 505 | } | 505 | } |
| 506 | /* | ||
| 507 | * Generate the __enabled_CONFIG_* and | ||
| 508 | * __enabled_CONFIG_*_MODULE macros for use by the | ||
| 509 | * IS_{ENABLED,BUILTIN,MODULE} macros. The _MODULE variant is | ||
| 510 | * generated even for booleans so that the IS_ENABLED() macro | ||
| 511 | * works. | ||
| 512 | */ | ||
| 513 | fprintf(fp, "#define __enabled_" CONFIG_ "%s %d\n", | ||
| 514 | sym->name, (*value == 'y')); | ||
| 515 | fprintf(fp, "#define __enabled_" CONFIG_ "%s_MODULE %d\n", | ||
| 516 | sym->name, (*value == 'm')); | ||
| 517 | break; | 506 | break; |
| 518 | } | 507 | } |
| 519 | case S_HEX: { | 508 | case S_HEX: { |
| @@ -565,6 +554,35 @@ static struct conf_printer header_printer_cb = | |||
| 565 | }; | 554 | }; |
| 566 | 555 | ||
| 567 | /* | 556 | /* |
| 557 | * Generate the __enabled_CONFIG_* and __enabled_CONFIG_*_MODULE macros for | ||
| 558 | * use by the IS_{ENABLED,BUILTIN,MODULE} macros. The _MODULE variant is | ||
| 559 | * generated even for booleans so that the IS_ENABLED() macro works. | ||
| 560 | */ | ||
| 561 | static void | ||
| 562 | header_print__enabled_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) | ||
| 563 | { | ||
| 564 | |||
| 565 | switch (sym->type) { | ||
| 566 | case S_BOOLEAN: | ||
| 567 | case S_TRISTATE: { | ||
| 568 | fprintf(fp, "#define __enabled_" CONFIG_ "%s %d\n", | ||
| 569 | sym->name, (*value == 'y')); | ||
| 570 | fprintf(fp, "#define __enabled_" CONFIG_ "%s_MODULE %d\n", | ||
| 571 | sym->name, (*value == 'm')); | ||
| 572 | break; | ||
| 573 | } | ||
| 574 | default: | ||
| 575 | break; | ||
| 576 | } | ||
| 577 | } | ||
| 578 | |||
| 579 | static struct conf_printer header__enabled_printer_cb = | ||
| 580 | { | ||
| 581 | .print_symbol = header_print__enabled_symbol, | ||
| 582 | .print_comment = header_print_comment, | ||
| 583 | }; | ||
| 584 | |||
| 585 | /* | ||
| 568 | * Tristate printer | 586 | * Tristate printer |
| 569 | * | 587 | * |
| 570 | * This printer is used when generating the `include/config/tristate.conf' file. | 588 | * This printer is used when generating the `include/config/tristate.conf' file. |
| @@ -945,11 +963,16 @@ int conf_write_autoconf(void) | |||
| 945 | conf_write_heading(out_h, &header_printer_cb, NULL); | 963 | conf_write_heading(out_h, &header_printer_cb, NULL); |
| 946 | 964 | ||
| 947 | for_all_symbols(i, sym) { | 965 | for_all_symbols(i, sym) { |
| 966 | if (!sym->name) | ||
| 967 | continue; | ||
| 968 | |||
| 948 | sym_calc_value(sym); | 969 | sym_calc_value(sym); |
| 949 | if (!(sym->flags & SYMBOL_WRITE) || !sym->name) | 970 | |
| 971 | conf_write_symbol(out_h, sym, &header__enabled_printer_cb, NULL); | ||
| 972 | |||
| 973 | if (!(sym->flags & SYMBOL_WRITE)) | ||
| 950 | continue; | 974 | continue; |
| 951 | 975 | ||
| 952 | /* write symbol to auto.conf, tristate and header files */ | ||
| 953 | conf_write_symbol(out, sym, &kconfig_printer_cb, (void *)1); | 976 | conf_write_symbol(out, sym, &kconfig_printer_cb, (void *)1); |
| 954 | 977 | ||
| 955 | conf_write_symbol(tristate, sym, &tristate_printer_cb, (void *)1); | 978 | conf_write_symbol(tristate, sym, &tristate_printer_cb, (void *)1); |
diff --git a/scripts/kconfig/lxdialog/textbox.c b/scripts/kconfig/lxdialog/textbox.c index c704712d0227..154c2dd245b7 100644 --- a/scripts/kconfig/lxdialog/textbox.c +++ b/scripts/kconfig/lxdialog/textbox.c | |||
| @@ -320,7 +320,6 @@ static void print_page(WINDOW * win, int height, int width) | |||
| 320 | */ | 320 | */ |
| 321 | static void print_line(WINDOW * win, int row, int width) | 321 | static void print_line(WINDOW * win, int row, int width) |
| 322 | { | 322 | { |
| 323 | int y, x; | ||
| 324 | char *line; | 323 | char *line; |
| 325 | 324 | ||
| 326 | line = get_line(); | 325 | line = get_line(); |
| @@ -329,10 +328,10 @@ static void print_line(WINDOW * win, int row, int width) | |||
| 329 | waddch(win, ' '); | 328 | waddch(win, ' '); |
| 330 | waddnstr(win, line, MIN(strlen(line), width - 2)); | 329 | waddnstr(win, line, MIN(strlen(line), width - 2)); |
| 331 | 330 | ||
| 332 | getyx(win, y, x); | ||
| 333 | /* Clear 'residue' of previous line */ | 331 | /* Clear 'residue' of previous line */ |
| 334 | #if OLD_NCURSES | 332 | #if OLD_NCURSES |
| 335 | { | 333 | { |
| 334 | int x = getcurx(win); | ||
| 336 | int i; | 335 | int i; |
| 337 | for (i = 0; i < width - x; i++) | 336 | for (i = 0; i < width - x; i++) |
| 338 | waddch(win, ' '); | 337 | waddch(win, ' '); |
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index 820d2b6800fb..19e200d91120 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <stdarg.h> | 15 | #include <stdarg.h> |
| 16 | #include <stdlib.h> | 16 | #include <stdlib.h> |
| 17 | #include <string.h> | 17 | #include <string.h> |
| 18 | #include <signal.h> | ||
| 18 | #include <unistd.h> | 19 | #include <unistd.h> |
| 19 | #include <locale.h> | 20 | #include <locale.h> |
| 20 | 21 | ||
| @@ -272,6 +273,7 @@ static struct menu *current_menu; | |||
| 272 | static int child_count; | 273 | static int child_count; |
| 273 | <|||
