Bläddra i källkod

* check if git executable really exists

(cherry picked from commit a77f5221f341b32bb964c03dc61c1e80b71714dd)
florian 3 år sedan
förälder
incheckning
7fca3c9b1f
2 ändrade filer med 6 tillägg och 2 borttagningar
  1. 3 1
      compiler/Makefile
  2. 3 1
      compiler/Makefile.fpc

+ 3 - 1
compiler/Makefile

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

+ 3 - 1
compiler/Makefile.fpc

@@ -143,7 +143,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