Re: Kbuild: how to cleanly retrieve information compilation about thelast build

From: Francis Moreau
Date: Sat Apr 16 2011 - 11:47:16 EST


On Sat, Apr 16, 2011 at 5:08 PM, <Valdis.Kletnieks@xxxxxx> wrote:
> On Sat, 16 Apr 2011 16:45:33 +0200, Francis Moreau said:
>
>> For example, user did:
>>   $ make CC=distcc
>> then call my script:
>>   $ my-script
>> which in its turn does:
>>   $ make
>> then the whole kernel is rebuilt..
>
> You have two choices then:
>
> 1)  Allow them to pass stuff to your script:
>
> $ make CC=distcc
> then call my script:
> $ my-script CC=distcc
> which in its turn does:
> $ make "$*"
>
> 2) Find out *why* they're doing a make of the kernel, and then calling your
> script that *again* does a make of the kernel, instead of just calling your
> script and being done with it.

Because the script needs some generated files and rather to ask to the user:

file X is missing, please run 'make prepare'

I just thought that it would be easier to let the script call make
prepare (this is just an example) automatically.

And from the script point of view, it's just easier to call make
instead of testing for all missing files.

But maybe it's just a bad idea.

> This sounds like you have a poorly designed
> build environment, and *that* needs fixing instead of kbuild.

Well I've never claimed that kbuild needs to be fixed.
--
Francis
--
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/