diff --git a/compiler/Makefile b/compiler/Makefile index c53f78ef00..ae56503072 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -348,6 +348,9 @@ CPUSUF=arm endif NOCPUDEF=1 MSGFILE=msg/error$(FPCLANG).msg +REVINC:=$(wildcard revision.inc) +ifneq ($(REVINC),) +override LOCALOPT+=-dREVINC SVNVERSION:=$(wildcard $(addsuffix /svnversion$(SRCEXEEXT),$(SEARCHPATH))) ifeq ($(REVSTR),) ifneq ($(SVNVERSION),) @@ -355,13 +358,6 @@ REVSTR:=$(shell $(SVNVERSION) -c .) export REVSTR endif endif -REVINC:=$(wildcard revision.inc) -ifneq ($(REVINC),) -override LOCALOPT+=-dREVINC -else -ifneq ($(REVSTR),) -override LOCALOPT+=-dREVINC -endif endif override LOCALOPT+=-d$(CPC_TARGET) -dGDB -dBROWSERLOG ifeq ($(PPC_TARGET),i386) diff --git a/compiler/Makefile.fpc b/compiler/Makefile.fpc index 31f15fa9c5..6eac342834 100644 --- a/compiler/Makefile.fpc +++ b/compiler/Makefile.fpc @@ -151,6 +151,12 @@ NOCPUDEF=1 MSGFILE=msg/error$(FPCLANG).msg +# Check if revision.inc is present +REVINC:=$(wildcard revision.inc) +ifneq ($(REVINC),) +# File revision.inc is present +#Use it to compile version.pas unit +override LOCALOPT+=-dREVINC # Automatically update revision.inc if # svnversion executable is available SVNVERSION:=$(wildcard $(addsuffix /svnversion$(SRCEXEEXT),$(SEARCHPATH))) @@ -160,14 +166,6 @@ REVSTR:=$(shell $(SVNVERSION) -c .) export REVSTR endif endif - -REVINC:=$(wildcard revision.inc) -ifneq ($(REVINC),) -override LOCALOPT+=-dREVINC -else -ifneq ($(REVSTR),) -override LOCALOPT+=-dREVINC -endif endif # set correct defines (-d$(CPU_TARGET) is automaticly added in makefile.fpc)