public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: lkml <linux-kernel@vger.kernel.org>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Roman Zippel <zippel@linux-m68k.org>,
	Michal Marek <mmarek@suse.cz>,
	Uwe Kleine-Koig <u.kleine-koenig@pengutronix.de>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH 1/4] kconfig: save location of config symbols
Date: Sun, 25 Jul 2010 23:38:46 +0200	[thread overview]
Message-ID: <20100725213846.GA5834@merkur.ravnborg.org> (raw)
In-Reply-To: <20100725213808.GA5814@merkur.ravnborg.org>

From f427c3886d7916ad8c6575964a753a33507d9f2e Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <sam@ravnborg.org>
Date: Sat, 24 Jul 2010 20:17:33 +0200
Subject: [PATCH 1/4] 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.

Signed-off-by: Sam Ravnborg <sam@ravnborg.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 891cd9c..4526a58 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -131,6 +131,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 203632c..6400823 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_prop(P_SYMBOL, NULL, NULL, NULL);
 }
 
 void menu_end_entry(void)
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 2e7a048..de36f3e 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -943,6 +943,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


  reply	other threads:[~2010-07-25 21:38 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-25 21:38 [RFC] kconfig: introduce alldefconfig + savedefconfig Sam Ravnborg
2010-07-25 21:38 ` Sam Ravnborg [this message]
2010-07-25 21:39 ` [PATCH 2/4] kconfig: print more info when we see a recursive dependency Sam Ravnborg
2010-07-25 21:39 ` [PATCH 3/4] kconfig: add alldefconfig Sam Ravnborg
2010-07-25 21:40 ` [PATCH 4/4] kconfig: add savedefconfig Sam Ravnborg
2010-07-27 15:42   ` Michal Marek
2010-07-27 16:50     ` Sam Ravnborg
2010-07-28 20:36     ` [RFC PATCH] kconfig: use long options in conf Sam Ravnborg
2010-07-29  8:13       ` Sam Ravnborg
2010-07-29  8:15         ` [PATCH 1/2] kconfig: rename loose_nonint_oldconfig => oldnoconfig Sam Ravnborg
2010-07-29  8:16         ` [PATCH 2/2] kconfig: change nonint_oldconfig to listnewconfig Sam Ravnborg
2010-07-29  9:23         ` [RFC PATCH] kconfig: use long options in conf Michal Marek
2010-07-29 14:47           ` Aristeu Rozanski
2010-07-29 15:04             ` Michal Marek
2010-07-29 15:16               ` Aristeu Rozanski
2010-07-29 19:34                 ` Sam Ravnborg
2010-07-29 19:50                   ` Aristeu Rozanski
2010-07-29 23:04                     ` Sam Ravnborg
2010-07-30 14:53                       ` Aristeu Rozanski
2010-07-29  9:17       ` Michal Marek
2010-07-29  9:39         ` Sam Ravnborg
2010-07-29 10:08           ` Michal Marek
2010-07-29 14:30             ` Randy Dunlap
2010-07-29 19:29               ` Sam Ravnborg
2010-07-25 22:20 ` [RFC] kconfig: introduce alldefconfig + savedefconfig Sam Ravnborg
2010-07-28  6:47 ` Uwe Kleine-König

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=20100725213846.GA5834@merkur.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=sfr@canb.auug.org.au \
    --cc=torvalds@linux-foundation.org \
    --cc=u.kleine-koenig@pengutronix.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox