diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-04-12 19:46:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-12 21:35:58 -0400 |
commit | a959613533a176a8f5f402585827e94a5220d2db (patch) | |
tree | 74953f42164342521a8285b80770ecc09d2b1e0f /scripts/kconfig | |
parent | 69349c2dc01c489eccaa4c472542c08e370c6d7e (diff) |
Revert "kconfig: fix __enabled_ macros definition for invisible and un-selected symbols"
This reverts commit 953742c8fe8ac45be453fee959d7be40cd89f920.
Dumping two lines into autoconf.h for all existing Kconfig options
results in a giant file (~16k lines) we have to process each time we
compile something. We've weaned IS_ENABLED() and similar off of
requiring the __enabled_ definitions so now we can revert the change
which caused all the extra lines.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r-- | scripts/kconfig/confdata.c | 49 |
1 files changed, 13 insertions, 36 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 0586085136d1..9d0674473564 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c | |||
@@ -489,6 +489,17 @@ header_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) | |||
489 | fprintf(fp, "#define %s%s%s 1\n", | 489 | fprintf(fp, "#define %s%s%s 1\n", |
490 | CONFIG_, sym->name, suffix); | 490 | CONFIG_, sym->name, suffix); |
491 | } | 491 | } |
492 | /* | ||
493 | * Generate the __enabled_CONFIG_* and | ||
494 | * __enabled_CONFIG_*_MODULE macros for use by the | ||
495 | * IS_{ENABLED,BUILTIN,MODULE} macros. The _MODULE variant is | ||
496 | * generated even for booleans so that the IS_ENABLED() macro | ||
497 | * works. | ||
498 | */ | ||
499 | fprintf(fp, "#define __enabled_" CONFIG_ "%s %d\n", | ||
500 | sym->name, (*value == 'y')); | ||
501 | fprintf(fp, "#define __enabled_" CONFIG_ "%s_MODULE %d\n", | ||
502 | sym->name, (*value == 'm')); | ||
492 | break; | 503 | break; |
493 | } | 504 | } |
494 | case S_HEX: { | 505 | case S_HEX: { |
@@ -540,35 +551,6 @@ static struct conf_printer header_printer_cb = | |||
540 | }; | 551 | }; |
541 | 552 | ||
542 | /* | 553 | /* |
543 | * Generate the __enabled_CONFIG_* and __enabled_CONFIG_*_MODULE macros for | ||
544 | * use by the IS_{ENABLED,BUILTIN,MODULE} macros. The _MODULE variant is | ||
545 | * generated even for booleans so that the IS_ENABLED() macro works. | ||
546 | */ | ||
547 | static void | ||
548 | header_print__enabled_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) | ||
549 | { | ||
550 | |||
551 | switch (sym->type) { | ||
552 | case S_BOOLEAN: | ||
553 | case S_TRISTATE: { | ||
554 | fprintf(fp, "#define __enabled_" CONFIG_ "%s %d\n", | ||
555 | sym->name, (*value == 'y')); | ||
556 | fprintf(fp, "#define __enabled_" CONFIG_ "%s_MODULE %d\n", | ||
557 | sym->name, (*value == 'm')); | ||
558 | break; | ||
559 | } | ||
560 | default: | ||
561 | break; | ||
562 | } | ||
563 | } | ||
564 | |||
565 | static struct conf_printer header__enabled_printer_cb = | ||
566 | { | ||
567 | .print_symbol = header_print__enabled_symbol, | ||
568 | .print_comment = header_print_comment, | ||
569 | }; | ||
570 | |||
571 | /* | ||
572 | * Tristate printer | 554 | * Tristate printer |
573 | * | 555 | * |
574 | * This printer is used when generating the `include/config/tristate.conf' file. | 556 | * This printer is used when generating the `include/config/tristate.conf' file. |
@@ -949,16 +931,11 @@ int conf_write_autoconf(void) | |||
949 | conf_write_heading(out_h, &header_printer_cb, NULL); | 931 | conf_write_heading(out_h, &header_printer_cb, NULL); |
950 | 932 | ||
951 | for_all_symbols(i, sym) { | 933 | for_all_symbols(i, sym) { |
952 | if (!sym->name) | ||
953 | continue; | ||
954 | |||
955 | sym_calc_value(sym); | 934 | sym_calc_value(sym); |
956 | 935 | if (!(sym->flags & SYMBOL_WRITE) || !sym->name) | |
957 | conf_write_symbol(out_h, sym, &header__enabled_printer_cb, NULL); | ||
958 | |||
959 | if (!(sym->flags & SYMBOL_WRITE)) | ||
960 | continue; | 936 | continue; |
961 | 937 | ||
938 | /* write symbol to auto.conf, tristate and header files */ | ||
962 | conf_write_symbol(out, sym, &kconfig_printer_cb, (void *)1); | 939 | conf_write_symbol(out, sym, &kconfig_printer_cb, (void *)1); |
963 | 940 | ||
964 | conf_write_symbol(tristate, sym, &tristate_printer_cb, (void *)1); | 941 | conf_write_symbol(tristate, sym, &tristate_printer_cb, (void *)1); |