From patchwork Mon Feb 23 15:09:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cheng Renquan X-Patchwork-Id: 8410 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n1NFAKpT011202 for ; Mon, 23 Feb 2009 15:10:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755240AbZBWPKW (ORCPT ); Mon, 23 Feb 2009 10:10:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754968AbZBWPKV (ORCPT ); Mon, 23 Feb 2009 10:10:21 -0500 Received: from ti-out-0910.google.com ([209.85.142.184]:26146 "EHLO ti-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753733AbZBWPKT (ORCPT ); Mon, 23 Feb 2009 10:10:19 -0500 Received: by ti-out-0910.google.com with SMTP id d10so1553408tib.23 for ; Mon, 23 Feb 2009 07:10:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=lM8lbyOvzFRQtHyJqcMZdA2+c1IkrPqfgZNDY45OOeY=; b=Q8NkcOrZAhRDNDUoTIbw4IxjVk/Y3hzFjMyOA7F8rPRxEIsSjcouysVGGFcWoJ8ZbB ff7J7fsVqE1iT1qRut8p66RIt81nwUksoY2vfuR1+BI9EJikv3OZJIVYWnGU3zfriw9+ Z4OH+WAVkPehG+atmZYFnZY9bmvj1ucqLkjmc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=Onn/h53ltgThCJDF0QfXEGCDrDhT/BfUjSHUtO0doF+H9PUQJYJXBwYpCNlWxy1had 5aP74SBgeVAjcucTdb8EXL6ZWmEIvgvk4lkVHbQ9BegUVRjv/6vlhcrafrd1TviwiAdX JSt6GadWj2lzspRr4ErgkSAZ30bGL5sHZ6ONk= Received: by 10.110.92.8 with SMTP id p8mr5941472tib.19.1235401817948; Mon, 23 Feb 2009 07:10:17 -0800 (PST) Received: from localhost.localdomain ([59.40.122.219]) by mx.google.com with ESMTPS id j5sm715564tid.21.2009.02.23.07.10.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Feb 2009 07:10:16 -0800 (PST) From: Cheng Renquan To: Randy Dunlap , Sam Ravnborg , Roman Zippel Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, cr_quan@163.com Subject: [PATCH 1/6] [KBUILD] add symbol value to help find the real depend Date: Mon, 23 Feb 2009 23:09:59 +0800 Message-Id: <1235401804-8136-2-git-send-email-crquan@gmail.com> X-Mailer: git-send-email 1.6.0.6 In-Reply-To: <1235401804-8136-1-git-send-email-crquan@gmail.com> References: <1235401804-8136-1-git-send-email-crquan@gmail.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org kbuild-menuconfig-display-depend-value.patch Sometimes when configuring need to disable some unused item, but the item is selected by many other items, it's hard to find the real dependency which selected it, This patch add every symbol's value accompanied to make it possible to find the real dependency easily. An example is CONFIG_RFKILL, ---------------------- RF switch subsystem support ---------------------- | CONFIG_RFKILL: | | | | Say Y here if you want to have control over RF switches | | found on many WiFi and Bluetooth cards. | | | | To compile this driver as a module, choose M here: the | | module will be called rfkill. | | | | Symbol: RFKILL [=m] | | Prompt: RF switch subsystem support | | Defined at net/rfkill/Kconfig:4 | | Depends on: NET [=y] | | Location: | | -> Networking support (NET [=y]) | | Selected by: IWLCORE [=n] && NETDEVICES [=y] && !S390 [=S390] && PC | | | ----------------------------------------------------------------( 99%)--- Signed-off-by: Cheng Renquan --- scripts/kconfig/expr.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c index 579ece4..cd8a2f0 100644 --- a/scripts/kconfig/expr.c +++ b/scripts/kconfig/expr.c @@ -1098,6 +1098,8 @@ void expr_fprint(struct expr *e, FILE *out) static void expr_print_gstr_helper(void *data, struct symbol *sym, const char *str) { str_append((struct gstr*)data, str); + if (sym) + str_printf((struct gstr*)data, " [=%s]", sym_get_string_value(sym)); } void expr_gstr_print(struct expr *e, struct gstr *gs)