Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Detecting kernel version in Makefile



Wouldn't using uname -r however, prevent you from building a DVB driver
for a kernel you are not running? If the kernel in $KERNEL_LOCATION is not
the kernel running, then that patch would make this DVB true unhelpful
(particularly during kernel upgrades)..

How about

export KERNEL_VERSION := $(shell grep '[\t ]UTS_RELEASE[\t ][\t ]*"' \
	$(KERNEL_LOCATION)/include/linux/version.h  | \
	sed -e 's;[^"]*"\(.*\)";\1;g' )

Is that a more vigorous search of version.h?

Chris Pitchford <cpitchford@intrepid.co.uk>

On Thu, 6 Feb 2003, Pete Martin wrote:

> Holger,
> > version.h will be generated when you properly configure + build your
> > kernel in /usr/src/linux/. Since we need the config, includes and
> > makefiles there anyway it's a proper way to detect the version of the
> > kernel which include files we're using.
> >
> > Please configure+install your kernel before you build the DVB driver, if
> > you build the driver against the wrong include files or use config files
> > that don't belong to your running kernel very strange side effects can
> > occur...
> Yes I know this is true. My point really was that accidentally detecting the
> kernel version by expecting the first line of a particular file to contain
> specific patterns is less portable than using the uname command. Who is to
> say that at some time in the future, a comment is added to the top of the
> version.h file?
>
> Pete
>
>
>
>
> --
> Info:
> To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.
>
>



-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index