All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Bug in gencmdlist.sh (or is it?)
Date: Wed, 01 Jul 2009 21:14:17 -0400	[thread overview]
Message-ID: <1246497257.8806.6.camel@mj> (raw)
In-Reply-To: <4A4BE47C.7060602@duboucher.eu>

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



  reply	other threads:[~2009-07-02  1:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-01 22:34 Bug in gencmdlist.sh (or is it?) Duboucher Thomas
2009-07-02  1:14 ` Pavel Roskin [this message]
2009-07-02  5:42   ` Duboucher Thomas
2009-07-04  5:07     ` Pavel Roskin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1246497257.8806.6.camel@mj \
    --to=proski@gnu.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.