From patchwork Sat Jul 31 21:35:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 116269 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6VLb8Rj011722 for ; Sat, 31 Jul 2010 21:37:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757124Ab0GaVfi (ORCPT ); Sat, 31 Jul 2010 17:35:38 -0400 Received: from pfepb.post.tele.dk ([195.41.46.236]:40608 "EHLO pfepb.post.tele.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757018Ab0GaVfg (ORCPT ); Sat, 31 Jul 2010 17:35:36 -0400 Received: from localhost.localdomain (x1-6-00-1e-2a-84-ae-3e.k225.webspeed.dk [80.163.61.94]) by pfepb.post.tele.dk (Postfix) with ESMTP id C1648F84020; Sat, 31 Jul 2010 23:35:35 +0200 (CEST) From: Sam Ravnborg To: Michal Marek , lkml , linux-kbuild Cc: Sam Ravnborg , Roman Zippel Subject: [PATCH 4/9] kconfig: save location of config symbols Date: Sat, 31 Jul 2010 23:35:29 +0200 Message-Id: <1280612134-8220-4-git-send-email-sam@ravnborg.org> X-Mailer: git-send-email 1.6.0.6 In-Reply-To: <20100731213429.GA8200@merkur.ravnborg.org> References: <20100731213429.GA8200@merkur.ravnborg.org> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 31 Jul 2010 21:37:09 +0000 (UTC) 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; }