aboutsummaryrefslogtreecommitdiff
path: root/Makefile.gen
diff options
context:
space:
mode:
authorThomas Huth <thuth@linux.vnet.ibm.com>2011-11-24 17:24:23 +0100
committerThomas Huth <thuth@linux.vnet.ibm.com>2011-11-24 17:28:28 +0100
commit54539073a963971b9e98dc64299a97b7e98cfd19 (patch)
treef7ecb940bd5e51ee4ed32d3ebbb6adac9aa2777b /Makefile.gen
parentc20f4bc8aca38a7aa9d7691a7c97bea8921627c7 (diff)
downloadSLOF-54539073a963971b9e98dc64299a97b7e98cfd19.zip
SLOF-54539073a963971b9e98dc64299a97b7e98cfd19.tar.gz
SLOF-54539073a963971b9e98dc64299a97b7e98cfd19.tar.bz2
Improved version printing
When building SLOF from a git repository, use the SHA-id as version information instead of the less useful "private build" string. Also make sure that version information is updated during each build, so that we also print more accurate "build date" information now. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Diffstat (limited to 'Makefile.gen')
-rw-r--r--Makefile.gen4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile.gen b/Makefile.gen
index 00cac13..b223643 100644
--- a/Makefile.gen
+++ b/Makefile.gen
@@ -21,9 +21,13 @@ ifdef DRIVER
RELEASE=$(shell cat ../VERSION)
export DRIVER_NAME=$(shell cat ../VERSION | sed -e "s/-/./g" | awk -F . '{ printf("%s%02d%02d%1s%02s",$$1,$$2,$$3,$$4,$$5); }')
else
+ifneq (,$(wildcard ../.git))
+RELEASE=git-$(shell git rev-parse --short=16 HEAD)
+else
RELEASE="$(USER)@$(HOSTNAME)(private build)"
export DRIVER_NAME=HEAD
endif
+endif
DRVDATE=$(shell date +%Y-%h%d)