Browse Source

* check if git executable really exists

florian 4 years ago
parent
commit
a77f5221f3
2 changed files with 6 additions and 2 deletions
  1. 3 1
      compiler/Makefile
  2. 3 1
      compiler/Makefile.fpc

+ 3 - 1
compiler/Makefile

@@ -461,7 +461,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
 endif
 ifdef COMPDATESTR

+ 3 - 1
compiler/Makefile.fpc

@@ -182,7 +182,9 @@ else
    GIT_DIR = $(wildcard ../.git)
    ifneq ($(GIT_DIR),)
       # ... then take date from head
-      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
 endif