From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MMAse-0006AO-Va for mharc-grub-devel@gnu.org; Wed, 01 Jul 2009 21:14:29 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MMAsd-0006AE-Cm for grub-devel@gnu.org; Wed, 01 Jul 2009 21:14:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MMAsY-00068P-52 for grub-devel@gnu.org; Wed, 01 Jul 2009 21:14:26 -0400 Received: from [199.232.76.173] (port=47125 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MMAsY-00068M-0u for grub-devel@gnu.org; Wed, 01 Jul 2009 21:14:22 -0400 Received: from c60.cesmail.net ([216.154.195.49]:25749) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1MMAsX-00085X-7P for grub-devel@gnu.org; Wed, 01 Jul 2009 21:14:21 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 01 Jul 2009 21:14:19 -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 0038034C6D for ; Wed, 1 Jul 2009 21:21:49 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <4A4BE47C.7060602@duboucher.eu> References: <4A4BE47C.7060602@duboucher.eu> Content-Type: text/plain Date: Wed, 01 Jul 2009 21:14:17 -0400 Message-Id: <1246497257.8806.6.camel@mj> Mime-Version: 1.0 X-Mailer: Evolution 2.26.2 (2.26.2-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: Thu, 02 Jul 2009 01:14:27 -0000 On Thu, 2009-07-02 at 00:34 +0200, Duboucher Thomas wrote: > I was working on some Grub2 module a few days ago and I spent a lot of > time on this. Basically, I was unable to correctly generate the file > command.lst; my new commands simply didn't appeared in it. > I finally found that gencmdlist.sh is only processing line per line > using sed, so that if one is writing with a different indentation, the > script silently fail. For instance, > > grub_extcmd > > ( > > "foo", > does not produce any output. I confirm that it's indeed a limitation of gencmdlist.sh. It may be possible to handle it by using C preprocessor before sed, but I don't think it's an urgent issue. It's shouldn't be a problem for properly indented source. > 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. > Perhaps a sed guru can have a look at this? I actually don't feel good about using anything other that a C compiler or preprocessor to parse C sources. It's working for now, but if we want to make it more reliable, I'd rather not ask a "sed guru". -- Regards, Pavel Roskin