aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-05-08 09:32:41 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-05-08 09:32:41 +0000
commitbf70eef53c7b3856c0a14aba2a4aea4685d1a0c9 (patch)
treecc202dfe1e74b06d9069f84d60d12e92b87e5f62
parent72f25038747e54e820941704c0d1cdc6aef3445f (diff)
downloadaports-bf70eef53c7b3856c0a14aba2a4aea4685d1a0c9.tar.bz2
aports-bf70eef53c7b3856c0a14aba2a4aea4685d1a0c9.tar.xz
make: test for .git existence before using git describe to set version
-rw-r--r--Make.rules2
1 files changed, 1 insertions, 1 deletions
diff --git a/Make.rules b/Make.rules
index c864064cbb..81881a7bcd 100644
--- a/Make.rules
+++ b/Make.rules
@@ -47,7 +47,7 @@ export srctree objtree
##
# Consult SCM for better version string.
-GIT_REV := $(shell git describe || echo exported)
+GIT_REV := $(shell test -d .git && git describe || echo exported)
ifneq ($(GIT_REV), exported)
FULL_VERSION := $(patsubst $(PACKAGE)-%,%,$(GIT_REV))
FULL_VERSION := $(patsubst v%,%,$(FULL_VERSION))