diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2006-06-09 01:12:45 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-06-09 01:31:30 -0400 |
commit | face4374e288372fba67c865eb0c92337f50d5a4 (patch) | |
tree | 81a9535cc6af701a9fd1d23338449268498447ed /scripts/kconfig/menu.c | |
parent | f6a88aa86027bdecfc74ef7c6bf6c68233e86bb3 (diff) |
kconfig: add defconfig_list/module option
This makes it possible to change two options which were hardcoded sofar.
1. Any symbol can now take the role of CONFIG_MODULES
2. The more useful option is to change the list of default file names,
which kconfig uses to load the base configuration if .config isn't
available.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/kconfig/menu.c')
-rw-r--r-- | scripts/kconfig/menu.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index 151ef2168a2c..a8afce24fb1b 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c | |||
@@ -154,6 +154,20 @@ void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep) | |||
154 | 154 | ||
155 | void menu_add_option(int token, char *arg) | 155 | void menu_add_option(int token, char *arg) |
156 | { | 156 | { |
157 | struct property *prop; | ||
158 | |||
159 | switch (token) { | ||
160 | case T_OPT_MODULES: | ||
161 | prop = prop_alloc(P_DEFAULT, modules_sym); | ||
162 | prop->expr = expr_alloc_symbol(current_entry->sym); | ||
163 | break; | ||
164 | case T_OPT_DEFCONFIG_LIST: | ||
165 | if (!sym_defconfig_list) | ||
166 | sym_defconfig_list = current_entry->sym; | ||
167 | else if (sym_defconfig_list != current_entry->sym) | ||
168 | zconf_error("trying to redefine defconfig symbol"); | ||
169 | break; | ||
170 | } | ||
157 | } | 171 | } |
158 | 172 | ||
159 | static int menu_range_valid_sym(struct symbol *sym, struct symbol *sym2) | 173 | static int menu_range_valid_sym(struct symbol *sym, struct symbol *sym2) |