Re: Kbuild: how to cleanly retrieve information compilation aboutthe last build

From: Sam Ravnborg
Date: Sat Apr 16 2011 - 09:59:43 EST


On Sat, Apr 16, 2011 at 10:05:43AM +0200, Francis Moreau wrote:
> Hello Sam,
>
> Maybe could suggest something, it would be great.
>
> Thanks
>
> On Thu, Apr 14, 2011 at 9:13 AM, Francis Moreau <francis.moro@xxxxxxxxx> wrote:
> > Hello,
> >
> > I'm writing a script to automatise some parts of my kernel compilation process.
> >
> > From those scripts I'd like to be able to call the top makefile the
> > same way it had been called during its last invocation.
> >
> > For example, if Ido:
> >
> >     $ make CC=my-gcc CFLAGS="-g -fwhatever"
> >
> > I would like to retrieve the "CC=my-gcc CFLAGS="-g -fwhatever" part of
> > the last invocation so my script can call make with the same
> > arguments.
> >
> > Is this possible ?

There is nothing made in kbuild to preserve the value of randomly
added variable assignments on the command-line.

If you specify O=... then a Makfile file is generated in the output
directory that thus emulate the O= setting.

CCFLAGS has btw. no effect when you build a kernel.

If you on a regular basis need to pass flags on the command-line
then you likely are doing something odd as this is not the typical use.
So please reconsider what you are doing.

And you can as pointed out by Américo Wang always save the
command line in your calling script.

Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/