public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] make kernelrelease
@ 2004-12-21  0:28 Matt Mackall
  2004-12-28 21:52 ` Sam Ravnborg
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Mackall @ 2004-12-21  0:28 UTC (permalink / raw)
  To: linux-kernel; +Cc: kai, sam

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 
 # ===========================================================================
 


-- 
Mathematics is the supreme nostalgia of our time.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-12-28 21:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-21  0:28 [PATCH] make kernelrelease Matt Mackall
2004-12-28 21:52 ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox