diff options
author | Matt Mackall <mpm@selenic.com> | 2004-12-29 00:42:36 +0100 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2004-12-29 00:42:36 +0100 |
commit | 2249c21bc140cd69da48c15c5b31f8d19f67df91 (patch) | |
tree | 7b9f74b0a94044ff1ef0f827144b08fbaed65ec8 /Makefile | |
parent | 3c991618bfe66778d79bc1c3baf194c361d1d2db (diff) | |
download | history-2249c21bc140cd69da48c15c5b31f8d19f67df91.tar.gz |
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: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile b/Makefile index e7236d78e8f1af..322bf1fc63d804 100644 --- a/Makefile +++ b/Makefile @@ -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 # =========================================================================== |