summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-05-07 18:52:08 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-05-07 18:52:08 +0000
commit7754a9b2bfdea294852b6eb2b40ba0c628083247 (patch)
tree75bf2b5c67ad26b06c95d70cc527b52c9ab2b704 /Makefile
parent3cffe48a9e2dbcd0d794b34dc7e1c1e043c437d5 (diff)
downloadmkinitfs-7754a9b2bfdea294852b6eb2b40ba0c628083247.tar.bz2
mkinitfs-7754a9b2bfdea294852b6eb2b40ba0c628083247.tar.xz
Makefile: check for .git dir before set version from git describe
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 894a9fa..278ff82 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ CONF_FILES := mkinitfs.conf \
SCRIPTS := $(SBIN_FILES) initramfs-init
IN_FILES := $(addsuffix .in,$(SCRIPTS))
-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))