ref: 7754a9b2bfdea294852b6eb2b40ba0c628083247
parent: 3cffe48a9e2dbcd0d794b34dc7e1c1e043c437d5
author: Natanael Copa <ncopa@alpinelinux.org>
date: Thu May 7 13:52:08 CDT 2009
Makefile: check for .git dir before set version from git describe
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@
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))