summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>2013-05-12 23:39:12 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-13 08:52:53 -0700
commitf7001929d0a999ba60f2d1a71a0ecdba6396cc10 (patch)
treedfdbfe3165c670c454660ac21a500b4ff2c2b1ce /Makefile
parent0f389dd1c9fcb5eb43705b12adceb108cb40da15 (diff)
downloadsubsurface-f7001929d0a999ba60f2d1a71a0ecdba6396cc10.tar.gz
Nuke debian patch disable-git-version.diff.
Running: $ git describe in a code tree lacking dir .git (unpacked release tar-ball, for example) throws an error: fatal: Not a git repository ... and that's noise that can be avoided. Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 8 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 7ff9a6eab..c87b957c2 100644
--- a/Makefile
+++ b/Makefile
@@ -34,13 +34,16 @@ STORED_VERSION_STRING = \
UNAME := $(shell $(CC) -dumpmachine 2>&1 | grep -E -o "linux|darwin|win|gnu|kfreebsd")
GET_VERSION = ./scripts/get-version
-VERSION_STRING := $(shell $(GET_VERSION) linux || echo "v$(VERSION)")
+VERSION_STRING := $(shell [ -d .git ] && $(GET_VERSION) linux || \
+ echo "v$(VERSION)")
# Mac Info.plist style with three numbers 1.2.3
-CFBUNDLEVERSION_STRING := $(shell $(GET_VERSION) darwin $(VERSION_STRING) || \
- echo "$(VERSION).0")
+CFBUNDLEVERSION_STRING := $(shell [ -d .git ] && \
+ $(GET_VERSION) darwin $(VERSION_STRING) || \
+ echo "$(VERSION).0")
# Windows .nsi style with four numbers 1.2.3.4
-PRODVERSION_STRING := $(shell $(GET_VERSION) win $(VERSION_STRING) || \
- echo "$(VERSION).0.0")
+PRODVERSION_STRING := $(shell [ -d .git ] && \
+ $(GET_VERSION) win $(VERSION_STRING) || \
+ echo "$(VERSION).0.0")
# find libdivecomputer
# First deal with the cross compile environment and with Mac.