aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2010-07-31 17:35:29 -0400
committerMichal Marek <mmarek@suse.cz>2010-08-03 07:49:31 -0400
commit59e89e3ddf8523be39a8e0a66bacbbdd6a72d069 (patch)
treeb92301020fc8f41304e8e12ed5eb2a80846a3628 /scripts
parent861b4ea4cc0eade661480f1ce197ae747f22a918 (diff)
kconfig: save location of config symbols
When we add a new config symbol save the file/line so we later can refer to their location. The information is saved as a property to a config symbol because we may have multiple definitions of the same symbol. This has the side-effect that a symbol always has at least one property. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/expr.h1
-rw-r--r--scripts/kconfig/menu.c2
-rw-r--r--scripts/kconfig/symbol.c2
3 files changed, 5 insertions, 0 deletions
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index 75a31e4552f3..6ee2e4fb1481 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -132,6 +132,7 @@ enum prop_type {
132 P_SELECT, /* select BAR */ 132 P_SELECT, /* select BAR */
133 P_RANGE, /* range 7..100 (for a symbol) */ 133 P_RANGE, /* range 7..100 (for a symbol) */
134 P_ENV, /* value from environment variable */ 134 P_ENV, /* value from environment variable */
135 P_SYMBOL, /* where a symbol is defined */
135}; 136};
136 137
137struct property { 138struct property {
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 11799894f3bd..4fb590247f33 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -58,6 +58,8 @@ void menu_add_entry(struct symbol *sym)
58 *last_entry_ptr = menu; 58 *last_entry_ptr = menu;
59 last_entry_ptr = &menu->next; 59 last_entry_ptr = &menu->next;
60 current_entry = menu; 60 current_entry = menu;
61 if (sym)
62 menu_add_symbol(P_SYMBOL, sym, NULL);
61} 63}
62 64
63void menu_end_entry(void) 65void menu_end_entry(void)
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index c127fa342f1d..9f180ab7698d 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -961,6 +961,8 @@ const char *prop_get_type_name(enum prop_type type)
961 return "select"; 961 return "select";
962 case P_RANGE: 962 case P_RANGE:
963 return "range"; 963 return "range";
964 case P_SYMBOL:
965 return "symbol";
964 case P_UNKNOWN: 966 case P_UNKNOWN:
965 break; 967 break;
966 } 968 }