Mailing List archive

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

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



Chris,

> 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)..
Good point. I guess I always build using the current kernel.

> 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?
Certainly more rigorous, but falls down when the version.h file contains
several UTS_RELEASE lines (like Mandrake's kernel as delivered out of the
box).

(Sigh) I guess the current implementation works OK as long as one builds the
kernel first.

Pete



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



Home | Main Index | Thread Index