diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-17 10:23:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-17 10:23:42 -0500 |
commit | 5a865c0606eb44d5d12cabb429751c83712183de (patch) | |
tree | 726d6eaf3b20f30900304bd0cbb6339b423a071f /scripts/kconfig/confdata.c | |
parent | 331d9d5958277de27e6ce42247e1cbec54fd1c7e (diff) | |
parent | 46e75f66677f5094bb51e91f9473128c4e907c7d (diff) |
Merge branch 'for-33' of git://repo.or.cz/linux-kbuild
* 'for-33' of git://repo.or.cz/linux-kbuild: (29 commits)
net: fix for utsrelease.h moving to generated
gen_init_cpio: fixed fwrite warning
kbuild: fix make clean after mismerge
kbuild: generate modules.builtin
genksyms: properly consider EXPORT_UNUSED_SYMBOL{,_GPL}()
score: add asm/asm-offsets.h wrapper
unifdef: update to upstream revision 1.190
kbuild: specify absolute paths for cscope
kbuild: create include/generated in silentoldconfig
scripts/package: deb-pkg: use fakeroot if available
scripts/package: add KBUILD_PKG_ROOTCMD variable
scripts/package: tar-pkg: use tar --owner=root
Kbuild: clean up marker
net: add net_tstamp.h to headers_install
kbuild: move utsrelease.h to include/generated
kbuild: move autoconf.h to include/generated
drop explicit include of autoconf.h
kbuild: move compile.h to include/generated
kbuild: drop include/asm
kbuild: do not check for include/asm-$ARCH
...
Fixed non-conflicting clean merge of modpost.c as per comments from
Stephen Rothwell (modpost.c had grown an include of linux/autoconf.h
that needed to be changed to generated/autoconf.h)
Diffstat (limited to 'scripts/kconfig/confdata.c')
-rw-r--r-- | scripts/kconfig/confdata.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index b55e72ff2fc6..c4dec80cfd8e 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c | |||
@@ -677,7 +677,7 @@ int conf_write_autoconf(void) | |||
677 | struct symbol *sym; | 677 | struct symbol *sym; |
678 | const char *str; | 678 | const char *str; |
679 | const char *name; | 679 | const char *name; |
680 | FILE *out, *out_h; | 680 | FILE *out, *tristate, *out_h; |
681 | time_t now; | 681 | time_t now; |
682 | int i, l; | 682 | int i, l; |
683 | 683 | ||
@@ -692,9 +692,16 @@ int conf_write_autoconf(void) | |||
692 | if (!out) | 692 | if (!out) |
693 | return 1; | 693 | return 1; |
694 | 694 | ||
695 | tristate = fopen(".tmpconfig_tristate", "w"); | ||
696 | if (!tristate) { | ||
697 | fclose(out); | ||
698 | return 1; | ||
699 | } | ||
700 | |||
695 | out_h = fopen(".tmpconfig.h", "w"); | 701 | out_h = fopen(".tmpconfig.h", "w"); |
696 | if (!out_h) { | 702 | if (!out_h) { |
697 | fclose(out); | 703 | fclose(out); |
704 | fclose(tristate); | ||
698 | return 1; | 705 | return 1; |
699 | } | 706 | } |
700 | 707 | ||
@@ -707,6 +714,9 @@ int conf_write_autoconf(void) | |||
707 | "# %s" | 714 | "# %s" |
708 | "#\n", | 715 | "#\n", |
709 | sym_get_string_value(sym), ctime(&now)); | 716 | sym_get_string_value(sym), ctime(&now)); |
717 | fprintf(tristate, "#\n" | ||
718 | "# Automatically generated - do not edit\n" | ||
719 | "\n"); | ||
710 | fprintf(out_h, "/*\n" | 720 | fprintf(out_h, "/*\n" |
711 | " * Automatically generated C config: don't edit\n" | 721 | " * Automatically generated C config: don't edit\n" |
712 | " * Linux kernel version: %s\n" | 722 | " * Linux kernel version: %s\n" |
@@ -727,10 +737,14 @@ int conf_write_autoconf(void) | |||
727 | break; | 737 | break; |
728 | case mod: | 738 | case mod: |
729 | fprintf(out, "CONFIG_%s=m\n", sym->name); | 739 | fprintf(out, "CONFIG_%s=m\n", sym->name); |
740 | fprintf(tristate, "CONFIG_%s=M\n", sym->name); | ||
730 | fprintf(out_h, "#define CONFIG_%s_MODULE 1\n", sym->name); | 741 | fprintf(out_h, "#define CONFIG_%s_MODULE 1\n", sym->name); |
731 | break; | 742 | break; |
732 | case yes: | 743 | case yes: |
733 | fprintf(out, "CONFIG_%s=y\n", sym->name); | 744 | fprintf(out, "CONFIG_%s=y\n", sym->name); |
745 | if (sym->type == S_TRISTATE) | ||
746 | fprintf(tristate, "CONFIG_%s=Y\n", | ||
747 | sym->name); | ||
734 | fprintf(out_h, "#define CONFIG_%s 1\n", sym->name); | 748 | fprintf(out_h, "#define CONFIG_%s 1\n", sym->name); |
735 | break; | 749 | break; |
736 | } | 750 | } |
@@ -772,13 +786,19 @@ int conf_write_autoconf(void) | |||
772 | } | 786 | } |
773 | } | 787 | } |
774 | fclose(out); | 788 | fclose(out); |
789 | fclose(tristate); | ||
775 | fclose(out_h); | 790 | fclose(out_h); |
776 | 791 | ||
777 | name = getenv("KCONFIG_AUTOHEADER"); | 792 | name = getenv("KCONFIG_AUTOHEADER"); |
778 | if (!name) | 793 | if (!name) |
779 | name = "include/linux/autoconf.h"; | 794 | name = "include/generated/autoconf.h"; |
780 | if (rename(".tmpconfig.h", name)) | 795 | if (rename(".tmpconfig.h", name)) |
781 | return 1; | 796 | return 1; |
797 | name = getenv("KCONFIG_TRISTATE"); | ||
798 | if (!name) | ||
799 | name = "include/config/tristate.conf"; | ||
800 | if (rename(".tmpconfig_tristate", name)) | ||
801 | return 1; | ||
782 | name = conf_get_autoconfig_name(); | 802 | name = conf_get_autoconfig_name(); |
783 | /* | 803 | /* |
784 | * This must be the last step, kbuild has a dependency on auto.conf | 804 | * This must be the last step, kbuild has a dependency on auto.conf |