Browse Source

only try to print the version from git if there's git installed

Steffen Jaeckel 8 years ago
parent
commit
adcd6ee9fd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      makefile_include.mk

+ 1 - 1
makefile_include.mk

@@ -111,7 +111,7 @@ LTC_CFLAGS += -Wno-nullability-completeness
 endif
 
 
-GIT_VERSION := $(shell [ -e .git ] && { printf git- ; git describe --tags --always --dirty ; } || echo $(VERSION))
+GIT_VERSION := $(shell { [ -e .git ] && which git 2>/dev/null 1>&2 ; } && { printf git- ; git describe --tags --always --dirty ; } || echo $(VERSION))
 ifneq ($(GIT_VERSION),)
 LTC_CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
 endif