浏览代码

* check if git executable really exists

florian 3 年之前
父节点
当前提交
a77f5221f3
共有 2 个文件被更改,包括 6 次插入2 次删除
  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