summaryrefslogtreecommitdiff
path: root/Makefile.inc
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@secunet.com>2011-03-17 07:47:49 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2011-03-17 07:47:49 +0000
commitb8e9ba9a7af6e5563de9f284d70812e3fb3e75b8 (patch)
treeea85a05832cd4c5bdb6087a446684117d988d28d /Makefile.inc
parent08827287d65faa50cdd7db96c41d830a48f07fce (diff)
More complete control over KERNELVERSION variable
Allow using revision information (from svn or git) even if the version number is changed on the command line (eg. make KERNELVERSION='11.03$(REV)') or dropping it entirely if having that information in the coreboot binary is not desired. Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com> Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6449 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'Makefile.inc')
-rw-r--r--Makefile.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile.inc b/Makefile.inc
index b87cec7d71..7cde3786d8 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -19,7 +19,8 @@
#######################################################################
# misleadingly named, this is the coreboot version
-export KERNELVERSION := 4.0
+REV=-r$(shell if [ -d $(top)/.svn -a -f "`which svnversion`" ]; then svnversion $(top); else if [ -d $(top)/.git -a -f "`which git`" ]; then git --git-dir=/$(top)/.git log|grep git-svn-id|cut -f 2 -d@|cut -f 1 -d' '|sort -g|tail -1; fi; fi)
+export KERNELVERSION := 4.0$(REV)
#######################################################################
# Basic component discovery
@@ -123,7 +124,7 @@ $(obj)/build.h: .xcompile
printf "/* build system definitions (autogenerated) */\n" > $(obj)/build.ht
printf "#ifndef __BUILD_H\n" >> $(obj)/build.ht
printf "#define __BUILD_H\n\n" >> $(obj)/build.ht
- printf "#define COREBOOT_VERSION \"$(KERNELVERSION)-r$(shell if [ -d $(top)/.svn -a -f "`which svnversion`" ]; then svnversion $(top); else if [ -d $(top)/.git -a -f "`which git`" ]; then git --git-dir=/$(top)/.git log|grep git-svn-id|cut -f 2 -d@|cut -f 1 -d' '|sort -g|tail -1; fi; fi)\"\n" >> $(obj)/build.ht
+ printf "#define COREBOOT_VERSION \"$(KERNELVERSION)\"\n" >> $(obj)/build.ht
printf "#define COREBOOT_EXTRA_VERSION \"$(COREBOOT_EXTRA_VERSION)\"\n" >> $(obj)/build.ht
printf "#define COREBOOT_BUILD \"`LANG= date`\"\n" >> $(obj)/build.ht
printf "\n" >> $(obj)/build.ht