Re: Versioning of tree

From: Sam Ravnborg
Date: Tue Oct 26 2004 - 12:13:15 EST


On Tue, Oct 26, 2004 at 08:26:33AM -0400, Ryan Anderson wrote:
> On Tue, Oct 26, 2004 at 12:49:02PM +0100, David Vrabel wrote:
> > Ryan Anderson wrote:
> > >
> > >Well, here's a patch that adds -BKxxxxxxxx to LOCALVERSION when a
> > >top-level BitKeeper tree is detected.
> > >[...]
> > > LOCALVERSION = $(subst $(space),, \
> > > $(shell cat /dev/null $(localversion-files)) \
> > >+ $(subst ",,$(localversion-bk)) \
> >
> > 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.
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.
Furthermore I like to avoid a dependency on perl for a basic kernel.

Can you retreive the version from bk using a simple shell 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/