aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/util.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 06:46:14 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 06:46:14 -0500
commit5ea293a9048d3a58cb0c840fa719d85ad14cba47 (patch)
tree88d1dd1eece2cfcbd858ff2c00fb0240dcfab3c7 /scripts/kconfig/util.c
parent03bc26cfefd6db756e6bc7fcda11dc17ada7be16 (diff)
parentd3883ecebbf9e095b9e379dabbbe8b2c1ee7a41c (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (79 commits) Remove references to "make dep" kconfig: document use of HAVE_* Introduce new section reference annotations tags: __ref, __refdata, __refconst kbuild: warn about ld added unique sections kbuild: add verbose option to Section mismatch reporting in modpost kconfig: tristate choices with mixed tristate and boolean values asm-generic/vmlix.lds.h: simplify __mem{init,exit}* dependencies remove __attribute_used__ kbuild: support ARCH=x86 in buildtar kconfig: remove "enable" kbuild: simplified warning report in modpost kbuild: introduce a few helpers in modpost kbuild: use simpler section mismatch warnings in modpost kbuild: link vmlinux.o before kallsyms passes kbuild: introduce new option to enhance section mismatch analysis Use separate sections for __dev/__cpu/__mem code/data compiler.h: introduce __section() all archs: consolidate init and exit sections in vmlinux.lds.h kbuild: check section names consistently in modpost kbuild: introduce blacklisting in modpost ...
Diffstat (limited to 'scripts/kconfig/util.c')
-rw-r--r--scripts/kconfig/util.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c
index e1cad924c0a4..f8e73c039dc8 100644
--- a/scripts/kconfig/util.c
+++ b/scripts/kconfig/util.c
@@ -29,6 +29,8 @@ struct file *file_lookup(const char *name)
29/* write a dependency file as used by kbuild to track dependencies */ 29/* write a dependency file as used by kbuild to track dependencies */
30int file_write_dep(const char *name) 30int file_write_dep(const char *name)
31{ 31{
32 struct symbol *sym, *env_sym;
33 struct expr *e;
32 struct file *file; 34 struct file *file;
33 FILE *out; 35 FILE *out;
34 36
@@ -45,8 +47,25 @@ int file_write_dep(const char *name)
45 fprintf(out, "\t%s\n", file->name); 47 fprintf(out, "\t%s\n", file->name);
46 } 48 }
47 fprintf(out, "\ninclude/config/auto.conf: \\\n" 49 fprintf(out, "\ninclude/config/auto.conf: \\\n"
48 "\t$(deps_config)\n\n" 50 "\t$(deps_config)\n\n");
49 "$(deps_config): ;\n"); 51
52 expr_list_for_each_sym(sym_env_list, e, sym) {
53 struct property *prop;
54 const char *value;
55
56 prop = sym_get_env_prop(sym);
57 env_sym = prop_get_symbol(prop);
58 if (!env_sym)
59 continue;
60 value = getenv(env_sym->name);
61 if (!value)
62 value = "";
63 fprintf(out, "ifneq \"$(%s)\" \"%s\"\n", env_sym->name, value);
64 fprintf(out, "include/config/auto.conf: FORCE\n");
65 fprintf(out, "endif\n");
66 }
67
68 fprintf(out, "\n$(deps_config): ;\n");
50 fclose(out); 69 fclose(out);
51 rename("..config.tmp", name); 70 rename("..config.tmp", name);
52 return 0; 71 return 0;