All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Michal Marek <mmarek@suse.cz>,
	lkml <linux-kernel@vger.kernel.org>,
	linux-kbuild <linux-kbuild@vger.kernel.org>
Cc: Sam Ravnborg <sam@ravnborg.org>, Roman Zippel <zippel@linux-m68k.org>
Subject: [PATCH 4/9] kconfig: save location of config symbols
Date: Sat, 31 Jul 2010 23:35:29 +0200	[thread overview]
Message-ID: <1280612134-8220-4-git-send-email-sam@ravnborg.org> (raw)
In-Reply-To: <20100731213429.GA8200@merkur.ravnborg.org>

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>
---
 scripts/kconfig/expr.h   |    1 +
 scripts/kconfig/menu.c   |    2 ++
 scripts/kconfig/symbol.c |    2 ++
 3 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index 75a31e4..6ee2e4f 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -132,6 +132,7 @@ enum prop_type {
 	P_SELECT,   /* select BAR */
 	P_RANGE,    /* range 7..100 (for a symbol) */
 	P_ENV,      /* value from environment variable */
+	P_SYMBOL,   /* where a symbol is defined */
 };
 
 struct property {
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 1179989..4fb5902 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -58,6 +58,8 @@ void menu_add_entry(struct symbol *sym)
 	*last_entry_ptr = menu;
 	last_entry_ptr = &menu->next;
 	current_entry = menu;
+	if (sym)
+		menu_add_symbol(P_SYMBOL, sym, NULL);
 }
 
 void menu_end_entry(void)
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index c127fa3..9f180ab 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)
 		return "select";
 	case P_RANGE:
 		return "range";
+	case P_SYMBOL:
+		return "symbol";
 	case P_UNKNOWN:
 		break;
 	}
-- 
1.6.0.6


  parent reply	other threads:[~2010-07-31 21:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-31 21:29 [PATCH v2 0/9] kconfig: introduce saveconfig and alldefconfig (+more) Sam Ravnborg
2010-07-31 21:31 ` [PATCH] kconfig: use long options in conf Sam Ravnborg
2010-07-31 21:31 ` [PATCH] kconfig: rename loose_nonint_oldconfig => oldnoconfig Sam Ravnborg
2010-07-31 21:31 ` [PATCH] kconfig: change nonint_oldconfig to listnewconfig Sam Ravnborg
2010-07-31 21:31 ` [PATCH] kconfig: save location of config symbols Sam Ravnborg
2010-07-31 21:31 ` [PATCH] kconfig: print more info when we see a recursive dependency Sam Ravnborg
2010-07-31 21:31 ` [PATCH] kconfig: add alldefconfig Sam Ravnborg
2010-07-31 21:31 ` [PATCH] kconfig: refactor code in symbol.c Sam Ravnborg
2010-07-31 21:31 ` [PATCH] kconfig: code refactoring in confdata.c Sam Ravnborg
2010-07-31 21:31 ` [PATCH] kconfig: add savedefconfig Sam Ravnborg
2010-07-31 21:34 ` [PATCH v2 0/9] kconfig: introduce saveconfig and alldefconfig (+more) Sam Ravnborg
2010-07-31 21:35   ` [PATCH 1/9] kconfig: use long options in conf Sam Ravnborg
2010-07-31 21:35   ` [PATCH 2/9] kconfig: rename loose_nonint_oldconfig => oldnoconfig Sam Ravnborg
2010-07-31 21:35   ` [PATCH 3/9] kconfig: change nonint_oldconfig to listnewconfig Sam Ravnborg
2010-07-31 21:35   ` Sam Ravnborg [this message]
2010-07-31 21:35   ` [PATCH 5/9] kconfig: print more info when we see a recursive dependency Sam Ravnborg
2010-07-31 21:35   ` [PATCH 6/9] kconfig: add alldefconfig Sam Ravnborg
2010-07-31 21:35   ` [PATCH 7/9] kconfig: refactor code in symbol.c Sam Ravnborg
2010-07-31 21:35   ` [PATCH 8/9] kconfig: code refactoring in confdata.c Sam Ravnborg
2010-07-31 21:35   ` [PATCH 9/9] kconfig: add savedefconfig Sam Ravnborg
2010-08-02  8:05     ` Uwe Kleine-König
2010-08-03 12:30 ` [PATCH v2 0/9] kconfig: introduce saveconfig and alldefconfig (+more) Michal Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1280612134-8220-4-git-send-email-sam@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=zippel@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.