lkml.org 
[lkml]   [2004]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] make kernelrelease
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@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:09    [W:0.087 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site