Commit 2249c21b authored by Matt Mackall's avatar Matt Mackall Committed by Sam Ravnborg

kbuild: make kernelrelease

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).

From: Matt Mackall <mpm@selenic.com>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 3c991618
......@@ -1210,6 +1210,9 @@ checkstack:
$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
$(PERL) $(src)/scripts/checkstack.pl $(ARCH)
kernelrelease:
@echo $(KERNELRELEASE)
# FIXME Should go into a make.lib or something
# ===========================================================================
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment