From 5e06e8967818a8e9b2accabaab6b896e706ffbd5 Mon Sep 17 00:00:00 2001 From: Don Date: Thu, 19 Aug 2021 07:51:36 +0100 Subject: [PATCH] Allow custom definition of GIT. (cherry picked from commit f6636c9c1c447ce1a2018b3389257c7bc0870a74) --- compiler/Makefile | 2 ++ compiler/Makefile.fpc | 3 +++ 2 files changed, 5 insertions(+) diff --git a/compiler/Makefile b/compiler/Makefile index e89b82617e..22ee2f3924 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -404,7 +404,9 @@ ifndef RTLOPT RTLOPT:=$(OPT) endif SVNVERSION:=$(firstword $(wildcard $(addsuffix /svnversion$(SRCEXEEXT),$(SEARCHPATH)))) +ifndef GIT GIT:=$(firstword $(wildcard $(addsuffix /git$(SRCEXEEXT),$(SEARCHPATH)))) +endif DATE_FMT = +%Y/%m/%d ifdef SOURCE_DATE_EPOCH COMPDATESTR ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u "$(DATE_FMT)") diff --git a/compiler/Makefile.fpc b/compiler/Makefile.fpc index 8ccc8d1727..a349a120df 100644 --- a/compiler/Makefile.fpc +++ b/compiler/Makefile.fpc @@ -130,7 +130,10 @@ RTLOPT:=$(OPT) endif SVNVERSION:=$(firstword $(wildcard $(addsuffix /svnversion$(SRCEXEEXT),$(SEARCHPATH)))) + +ifndef GIT GIT:=$(firstword $(wildcard $(addsuffix /git$(SRCEXEEXT),$(SEARCHPATH)))) +endif DATE_FMT = +%Y/%m/%d ifdef SOURCE_DATE_EPOCH