]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Makefile: fix VERSION and GITVERSION
authorHarald Hoyer <harald@redhat.com>
Wed, 30 Sep 2015 12:10:05 +0000 (14:10 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 11 Nov 2015 10:48:32 +0000 (11:48 +0100)
Makefile

index f3a5c07da462a9304ec5b1d342dc442a1e3bc005..8454c6370ad15dc917c01f110bf22bc804793e06 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 -include dracut-version.sh
 
-VERSION = $(shell [ -d .git ] && git describe --abbrev=0 --tags 2>/dev/null || echo $(DRACUT_VERSION))
-GITVERSION = $(shell [ -d .git ] && { v=$$(git describe --tags 2>/dev/null); [ $${v\#*-} != $$v ] && echo -$${v\#*-}; } )
+VERSION ?= $(shell [ -d .git ] && git describe --abbrev=0 --tags 2>/dev/null || echo $(DRACUT_VERSION))
+GITVERSION ?= $(shell [ -d .git ] && { v=$$(git describe --tags 2>/dev/null); [ -n "$$v" ] && [ $${v\#*-} != $$v ] && echo -$${v\#*-}; } )
 
 -include Makefile.inc