From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MMxTR-0007bJ-QD for mharc-grub-devel@gnu.org; Sat, 04 Jul 2009 01:07:41 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MMxTP-0007Xj-2v for grub-devel@gnu.org; Sat, 04 Jul 2009 01:07:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MMxTJ-0007O5-TY for grub-devel@gnu.org; Sat, 04 Jul 2009 01:07:38 -0400 Received: from [199.232.76.173] (port=57858 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MMxTJ-0007Nn-KQ for grub-devel@gnu.org; Sat, 04 Jul 2009 01:07:33 -0400 Received: from c60.cesmail.net ([216.154.195.49]:4424) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1MMxTJ-0004mu-1c for grub-devel@gnu.org; Sat, 04 Jul 2009 01:07:33 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 04 Jul 2009 01:07:32 -0400 Received: from [192.168.0.22] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id 5575534C6A for ; Sat, 4 Jul 2009 01:15:21 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <4A4C48CF.5090609@duboucher.eu> References: <4A4BE47C.7060602@duboucher.eu> <1246497257.8806.6.camel@mj> <4A4C48CF.5090609@duboucher.eu> Content-Type: text/plain Date: Sat, 04 Jul 2009 01:07:29 -0400 Message-Id: <1246684049.2544.50.camel@mj> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: Bug in gencmdlist.sh (or is it?) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2009 05:07:39 -0000 On Thu, 2009-07-02 at 07:42 +0200, Duboucher Thomas wrote: > No, it is not really urgent. As I said, I have already found a > workaround. But based on Grub2 being a module-based project, I don't > think an indentation-dependant parser is a good idea, nor is it robust. I agree. > >> I am working now with a small script > >> written in Lua, but it is neither efficient, nor a good idea to add Lua > >> as a dependency. > > > > I don't understand how this is related. > > > > I have replaced gencmdlist.sh by a script in Lua that does the same, and > can handle any kind of indentation - or at least the resulting file is > identical even if I mess the indentation; but based on how and when I > have writen it, well, I'm not very confident ;) -. I think an improved approach would be one of those: 1) Make gencmdlist.sh call cpp with a special macro, that would expand into something that can be reliably extracted by sed or grep and placed into command.lst. 2) Use a macro to write the symbol into a special linker section. gencmdlist.sh would read it to generate command.lst at the build time. 3) Use a macro to write the symbol into a special linker section. grub-install would run a new utility to generate command.lst from the modules in /boot/grub. The later is very appealing, but it would be a big change in the way we are doing things. -- Regards, Pavel Roskin