(cherry picked from commit a77f5221f341b32bb964c03dc61c1e80b71714dd)
@@ -413,7 +413,9 @@ ifdef SOURCE_DATE_EPOCH
else
GIT_DIR = $(wildcard ../.git)
ifneq ($(GIT_DIR),)
- COMPDATESTR:=$(shell $(GIT) log -1 --pretty=%cd --date=format:'%Y/%m/%d')
+ ifneq ($(GIT),)
+ COMPDATESTR:=$(shell $(GIT) log -1 --pretty=%cd --date=format:'%Y/%m/%d')
+ endif
endif
ifdef COMPDATESTR
@@ -143,7 +143,9 @@ else
# ... then take date from head