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

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


On Sat, Apr 16, 2011 at 5:47 PM, Francis Moreau <francis.moro@xxxxxxxxx> wrote:
> 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.

Actually think about this example:

The user modify a file, then instead of calling 'make' (because he
forgets) run the script that send the kernel image through the net on
a test machine. Since the user had already compiled the kernel before,
the kernel image exists but is outdated.

How can a script detect this case if it doesn't call 'make' in its turn ?

--
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/