Hello, OKUJI!
> > make GRUB_CFLAGS=-g
> >
> > I expect that the GRUB shell will be built without optimization (because
> > I'm going to debug it). However, the -O2 option is not suppressed, since
> > it's hardcoded in stage2/Makefile.in
>
> I don't think -O2 disables you from debugging it. Do you have
> another reason?
You overestimate gdb or underestimate gcc :-(
I have no other reason in the moment
> > Automake is smart enough to place FOO=@FOO@ at the beginning of
> > Makefile.in when necessary.
>
> As long as I see, Automake just adds FOO=@FOO@, whether FOO is used
> or not. Not smart.
Maybe, but this doesn't make my patch wrong
Pavel Roskin