Browse Source

Avoid troubles with exported directories

Pierre Muller 1 year ago
parent
commit
d9ad6bdd1f
2 changed files with 12 additions and 2 deletions
  1. 6 1
      compiler/Makefile
  2. 6 1
      compiler/Makefile.fpc

+ 6 - 1
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

+ 6 - 1
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