From patchwork Sat Sep 11 15:51:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Lacombe X-Patchwork-Id: 172062 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8BFrsFo029069 for ; Sat, 11 Sep 2010 15:54:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752836Ab0IKPyB (ORCPT ); Sat, 11 Sep 2010 11:54:01 -0400 Received: from mail-gw0-f46.google.com ([74.125.83.46]:53064 "EHLO mail-gw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752394Ab0IKPyB (ORCPT ); Sat, 11 Sep 2010 11:54:01 -0400 Received: by mail-gw0-f46.google.com with SMTP id 17so1555732gwj.19 for ; Sat, 11 Sep 2010 08:54:01 -0700 (PDT) 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=jzorGVQd9y2i9SIdCU4urde5dWia936ZYwRjnYA94i8=; b=Deaw0lBLvFwsJfLkMpf1fTdsOIlil41TAM/ejVfZBrxYEr02Q57XKbw69WvG9eVaLy fFF7RZ7ALfmKUwK2zI2bzRCBq8VZ9l/YjxiOx5EjA2JDuxy7Z0GqhyJxCHPKUv0DFxzD f0sCiWBzpjiI8ra9/4qolt0XWC9INIPTgjiU4= 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=Lf6xUP2Nl/p+XkrVtuspVHw5XLIbCZ1VKoNsbZpnT/TU+VvP7Llc6LVI50P4Te4h8a yC+U8Re+6c3lyCXeGx2uUQGb5BHwkyIs26iz7QkLEn9KAljAqITcOphJa3SxPY54JRH4 5a796WW/v24mnzSLM+5+0dS8nPll8GmC7txOA= Received: by 10.150.136.4 with SMTP id j4mr2165134ybd.293.1284220440957; Sat, 11 Sep 2010 08:54:00 -0700 (PDT) Received: from localhost.localdomain (69-165-136-93.dsl.teksavvy.com [69.165.136.93]) by mx.google.com with ESMTPS id m12sm4025812ybn.19.2010.09.11.08.53.59 (version=SSLv3 cipher=RC4-MD5); Sat, 11 Sep 2010 08:54:00 -0700 (PDT) From: Arnaud Lacombe To: Sam Ravnborg , Michal Marek Cc: linux-kbuild , Arnaud Lacombe Subject: [PATCH 06/15] kconfig: implement the `mainmenu' directive Date: Sat, 11 Sep 2010 11:51:13 -0400 Message-Id: <1284220282-3500-7-git-send-email-lacombar@gmail.com> X-Mailer: git-send-email 1.7.2.30.gc37d7.dirty In-Reply-To: <1284220282-3500-1-git-send-email-lacombar@gmail.com> References: <1284220282-3500-1-git-send-email-lacombar@gmail.com> 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 (demeter1.kernel.org [140.211.167.41]); Sat, 11 Sep 2010 15:54:03 +0000 (UTC) diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt index b472e4e..2fe93ca 100644 --- a/Documentation/kbuild/kconfig-language.txt +++ b/Documentation/kbuild/kconfig-language.txt @@ -322,7 +322,8 @@ mainmenu: "mainmenu" This sets the config program's title bar if the config program chooses -to use it. +to use it. It should be placed at the top of the configuration, before any +other statement. Kconfig hints diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y index 23dfd3b..e9b14efd 100644 --- a/scripts/kconfig/zconf.y +++ b/scripts/kconfig/zconf.y @@ -36,7 +36,7 @@ static struct menu *current_menu, *current_entry; #define YYERROR_VERBOSE #endif %} -%expect 26 +%expect 28 %union { @@ -104,14 +104,15 @@ static struct menu *current_menu, *current_entry; %} %% -input: stmt_list; +input: nl start | start; + +start: mainmenu_stmt stmt_list | stmt_list; stmt_list: /* empty */ | stmt_list common_stmt | stmt_list choice_stmt | stmt_list menu_stmt - | stmt_list T_MAINMENU prompt nl | stmt_list end { zconf_error("unexpected end statement"); } | stmt_list T_WORD error T_EOL { zconf_error("unknown statement \"%s\"", $2); } | stmt_list option_name error T_EOL @@ -342,6 +343,13 @@ if_block: | if_block choice_stmt ; +/* mainmenu entry */ + +mainmenu_stmt: T_MAINMENU prompt nl +{ + menu_add_prompt(P_MENU, $2, NULL); +}; + /* menu entry */ menu: T_MENU prompt T_EOL