Messages in this thread | | | Date | Tue, 28 Dec 2004 22:52:28 +0100 | From | Sam Ravnborg <> | Subject | Re: [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/
| |