From d9ad6bdd1f2d586eb3e199b26ed80552c29950fd Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Tue, 3 Oct 2023 10:06:10 +0000 Subject: [PATCH] Avoid troubles with exported directories --- compiler/Makefile | 7 ++++++- compiler/Makefile.fpc | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/compiler/Makefile b/compiler/Makefile index 5e6fff6144..d3879179a7 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -633,7 +633,12 @@ REVSTR:=$(REVSTR)-$(word 4,$(subst -, ,$(GITDESCRIBE))) export REVSTR else ifneq ($(SVNVERSION),) -REVSTR:=$(subst r,,$(subst r1:,,r$(subst exported,,$(shell $(SVNVERSION) -c .)))) +SVNVERSTR:=$(shell $(SVNVERSION) -c .) + ifneq ($(words $(SVNVERSTR)),1) +REVSTR:=$(subst $() $(),_,$(SVNVERSTR)) + else +REVSTR:=$(subst r,,$(subst r1:,,r$(subst exported,,$(SVNVERSTR)))) + endif export REVSTR endif endif diff --git a/compiler/Makefile.fpc b/compiler/Makefile.fpc index 119db27421..9ba96112b3 100644 --- a/compiler/Makefile.fpc +++ b/compiler/Makefile.fpc @@ -357,7 +357,12 @@ REVSTR:=$(REVSTR)-$(word 4,$(subst -, ,$(GITDESCRIBE))) export REVSTR else ifneq ($(SVNVERSION),) -REVSTR:=$(subst r,,$(subst r1:,,r$(subst exported,,$(shell $(SVNVERSION) -c .)))) +SVNVERSTR:=$(shell $(SVNVERSION) -c .) + ifneq ($(words $(SVNVERSTR)),1) +REVSTR:=$(subst $() $(),_,$(SVNVERSTR)) + else +REVSTR:=$(subst r,,$(subst r1:,,r$(subst exported,,$(SVNVERSTR)))) + endif export REVSTR endif endif