From 54539073a963971b9e98dc64299a97b7e98cfd19 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Thu, 24 Nov 2011 17:24:23 +0100 Subject: 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 --- Makefile.gen | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile.gen') 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) -- cgit v1.1