Re: [PATCH] make kernelrelease

From: Sam Ravnborg
Date: Tue Dec 28 2004 - 16:52:41 EST


On Mon, Dec 20, 2004 at 04:28:15PM -0800, Matt Mackall wrote:
> This patch makes it easy to programmatically get at the kernel
> makefile's idea of the kernel version from external scripts and
> makefiles with something like V=`make kernelrelease`.
>
> Alternatives include parsing Makefile (errorprone and broken by things
> like localversion) and running the C preprocessor on version.h (which
> requires a) building version.h somewhere and b) is really ugly).
>
> Index: l/Makefile
> ===================================================================
> --- l.orig/Makefile 2004-12-20 16:08:11.746716000 -0800
> +++ l/Makefile 2004-12-20 16:18:25.036696000 -0800
> @@ -1187,6 +1187,9 @@
> $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
> $(PERL) $(src)/scripts/checkstack.pl $(ARCH)
>
> +kernelrelease:
> + @echo $(KERNELRELEASE)
> +
> # FIXME Should go into a make.lib or something
> # ===========================================================================

Applied - thanks.

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/