[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in gencmdlist.sh (or is it?)
From: |
Pavel Roskin |
Subject: |
Re: Bug in gencmdlist.sh (or is it?) |
Date: |
Wed, 01 Jul 2009 21:14:17 -0400 |
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