diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 14:05:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 14:05:15 -0400 |
commit | 2a2ed2db353d949c06b6ef8b6913f65b39111eab (patch) | |
tree | d835c3dd101da91089c3bdf51c8632e84be37232 /scripts/kconfig/menu.c | |
parent | 972d19e837833b93466c6f6a8ef2a7d653000aa3 (diff) | |
parent | 070b98bfda3d27269519067c1c67eaef695f3e0c (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (40 commits)
kbuild: trivial fixes in Makefile
kbuild: adding symbols in Kconfig and defconfig to TAGS
kbuild: replace abort() with exit(1)
kbuild: support for %.symtypes files
kbuild: fix silentoldconfig recursion
kbuild: add option for stripping modules while installing them
kbuild: kill some false positives from modpost
kbuild: export-symbol usage report generator
kbuild: fix make -rR breakage
kbuild: append -dirty for updated but uncommited changes
kbuild: append git revision for all untagged commits
kbuild: fix module.symvers parsing in modpost
kbuild: ignore make's built-in rules & variables
kbuild: bugfix with initramfs
kbuild: modpost build fix
kbuild: check license compatibility when building modules
kbuild: export-type enhancement to modpost.c
kbuild: add dependency on kernel.release to the package targets
kbuild: `make kernelrelease' speedup
kconfig: KCONFIG_OVERWRITECONFIG
...
Diffstat (limited to 'scripts/kconfig/menu.c')
-rw-r--r-- | scripts/kconfig/menu.c | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index 0fce20cb7f3c..c86c27f2c761 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c | |||
@@ -114,7 +114,7 @@ void menu_set_type(int type) | |||
114 | sym->type = type; | 114 | sym->type = type; |
115 | return; | 115 | return; |
116 | } | 116 | } |
117 | menu_warn(current_entry, "type of '%s' redefined from '%s' to '%s'\n", | 117 | menu_warn(current_entry, "type of '%s' redefined from '%s' to '%s'", |
118 | sym->name ? sym->name : "<choice>", | 118 | sym->name ? sym->name : "<choice>", |
119 | sym_type_name(sym->type), sym_type_name(type)); | 119 | sym_type_name(sym->type), sym_type_name(type)); |
120 | } | 120 | } |
@@ -124,15 +124,20 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e | |||
124 | struct property *prop = prop_alloc(type, current_entry->sym); | 124 | struct property *prop = prop_alloc(type, current_entry->sym); |
125 | 125 | ||
126 | prop->menu = current_entry; | 126 | prop->menu = current_entry; |
127 | prop->text = prompt; | ||
128 | prop->expr = expr; | 127 | prop->expr = expr; |
129 | prop->visible.expr = menu_check_dep(dep); | 128 | prop->visible.expr = menu_check_dep(dep); |
130 | 129 | ||
131 | if (prompt) { | 130 | if (prompt) { |
131 | if (isspace(*prompt)) { | ||
132 | prop_warn(prop, "leading whitespace ignored"); | ||
133 | while (isspace(*prompt)) | ||
134 | prompt++; | ||
135 | } | ||
132 | if (current_entry->prompt) | 136 | if (current_entry->prompt) |
133 | menu_warn(current_entry, "prompt redefined\n"); | 137 | prop_warn(prop, "prompt redefined"); |
134 | current_entry->prompt = prop; | 138 | current_entry->prompt = prop; |
135 | } | 139 | } |
140 | prop->text = prompt; | ||
136 | 141 | ||
137 | return prop; | 142 | return prop; |
138 | } | 143 | } |
@@ -152,6 +157,24 @@ void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep) | |||
152 | menu_add_prop(type, NULL, expr_alloc_symbol(sym), dep); | 157 | menu_add_prop(type, NULL, expr_alloc_symbol(sym), dep); |
153 | } | 158 | } |
154 | 159 | ||
160 | void menu_add_option(int token, char *arg) | ||
161 | { | ||
162 | struct property *prop; | ||
163 | |||
164 | switch (token) { | ||
165 | case T_OPT_MODULES: | ||
166 | prop = prop_alloc(P_DEFAULT, modules_sym); | ||
167 | prop->expr = expr_alloc_symbol(current_entry->sym); | ||
168 | break; | ||
169 | case T_OPT_DEFCONFIG_LIST: | ||
170 | if (!sym_defconfig_list) | ||
171 | sym_defconfig_list = current_entry->sym; | ||
172 | else if (sym_defconfig_list != current_entry->sym) | ||
173 | zconf_error("trying to redefine defconfig symbol"); | ||
174 | break; | ||
175 | } | ||
176 | } | ||
177 | |||
155 | static int menu_range_valid_sym(struct symbol *sym, struct symbol *sym2) | 178 | static int menu_range_valid_sym(struct symbol *sym, struct symbol *sym2) |
156 | { | 179 | { |
157 | return sym2->type == S_INT || sym2->type == S_HEX || | 180 | return sym2->type == S_INT || sym2->type == S_HEX || |
@@ -325,11 +348,10 @@ void menu_finalize(struct menu *parent) | |||
325 | 348 | ||
326 | if (sym && !(sym->flags & SYMBOL_WARNED)) { | 349 | if (sym && !(sym->flags & SYMBOL_WARNED)) { |
327 | if (sym->type == S_UNKNOWN) | 350 | if (sym->type == S_UNKNOWN) |
328 | menu_warn(parent, "config symbol defined " | 351 | menu_warn(parent, "config symbol defined without type"); |
329 | "without type\n"); | ||
330 | 352 | ||
331 | if (sym_is_choice(sym) && !parent->prompt) | 353 | if (sym_is_choice(sym) && !parent->prompt) |
332 | menu_warn(parent, "choice must have a prompt\n"); | 354 | menu_warn(parent, "choice must have a prompt"); |
333 | 355 | ||
334 | /* Check properties connected to this symbol */ | 356 | /* Check properties connected to this symbol */ |
335 | sym_check_prop(sym); | 357 | sym_check_prop(sym); |