From adcd6ee9fdd2f4957ae04c78fcc65a67117ec9d4 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Tue, 3 Oct 2017 19:54:27 +0200 Subject: [PATCH] only try to print the version from git if there's git installed --- makefile_include.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile_include.mk b/makefile_include.mk index 03a8ccf2e..cbef31c78 100644 --- a/makefile_include.mk +++ b/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