Blame 0091-Makefile-fix-VERSION-and-GITVERSION.patch

Harald Hoyer bb31e7
From 8019e0eef3d36a4933ab96a8a8edfef5f3685593 Mon Sep 17 00:00:00 2001
Harald Hoyer bb31e7
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer bb31e7
Date: Wed, 30 Sep 2015 14:10:05 +0200
Harald Hoyer bb31e7
Subject: [PATCH] Makefile: fix VERSION and GITVERSION
Harald Hoyer bb31e7
Harald Hoyer bb31e7
---
Harald Hoyer bb31e7
 Makefile | 4 ++--
Harald Hoyer bb31e7
 1 file changed, 2 insertions(+), 2 deletions(-)
Harald Hoyer bb31e7
Harald Hoyer bb31e7
diff --git a/Makefile b/Makefile
Harald Hoyer bb31e7
index f3a5c07..8454c63 100644
Harald Hoyer bb31e7
--- a/Makefile
Harald Hoyer bb31e7
+++ b/Makefile
Harald Hoyer bb31e7
@@ -1,7 +1,7 @@
Harald Hoyer bb31e7
 -include dracut-version.sh
Harald Hoyer bb31e7
 
Harald Hoyer bb31e7
-VERSION = $(shell [ -d .git ] && git describe --abbrev=0 --tags 2>/dev/null || echo $(DRACUT_VERSION))
Harald Hoyer bb31e7
-GITVERSION = $(shell [ -d .git ] && { v=$$(git describe --tags 2>/dev/null); [ $${v\#*-} != $$v ] && echo -$${v\#*-}; } )
Harald Hoyer bb31e7
+VERSION ?= $(shell [ -d .git ] && git describe --abbrev=0 --tags 2>/dev/null || echo $(DRACUT_VERSION))
Harald Hoyer bb31e7
+GITVERSION ?= $(shell [ -d .git ] && { v=$$(git describe --tags 2>/dev/null); [ -n "$$v" ] && [ $${v\#*-} != $$v ] && echo -$${v\#*-}; } )
Harald Hoyer bb31e7
 
Harald Hoyer bb31e7
 -include Makefile.inc
Harald Hoyer bb31e7