summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 4ce74745a9..f91e8d4297 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -14,7 +14,8 @@
##
ifneq ($(NOCOMPILE),1)
-GIT:=$(shell [ -e "$(top)/.git" ] && command -v git)
+GIT:=$(shell git -C "$(top)" rev-parse --git-dir 1>/dev/null 2>&1 \
+ && command -v git)
else
GIT:=
endif