lkml.org 
[lkml]   [2004]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: Versioning of tree
From
> On Tue, Oct 26, 2004 at 09:08:15PM +0200, Sam Ravnborg wrote:
>> On Tue, Oct 26, 2004 at 08:26:33AM -0400, Ryan Anderson wrote:
>> > > Surely there's no need for this? Can't the script spit out an
>> > > appropriate localversion* file instead?
>> >
>> > It can, and yes, my first version used that method.
>> >
>> > Except it never worked. I was able to generate the file before
>> > include/linux/version.h was rebuilt, but failed to get it picked up in
>> > that. I'm not really sure why.
>>
>> The $(wildcard ...) function was executed before you created the file.
>
> Can you explain why?

GNU make distingush between ":=" and "=".
An assignment made using ":=" is done immediatly.
So when make first encounter ":=" is will execute the $(wildcard ...)
function, long
before you create the localversion-bk file.

If instead "=" is used the evaluation will be deferred until you actually
dereference the variable - so here the localversion-bk fiel may well be
created.

>
>> If we shall retreive the version from a SCM then as you already do
>> must hide it in a script.
>
>> I want the script only to be executed when we actually ask kbuild to
>> build a kernel - so it has to be part of the prepare rule set.
>
> As part of the prepare ruleset, should I simply add a prepare3 (and hook
> it in appropriately), or do you mean, just have it in the same section
The prepare part is more or less made to have full control on order of
the rules - so a make -j 50 goes well.
So just hooking it under prepare1 should do the trick.

>
> The patch below has both the Perl and shell script in it, as well as the
> added config option to disable this feature.

Will take a look when I'm on my Linux box.

Sam


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

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.074 / U:1.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site