Browse Source

* Only update revision.inc if it is already present

git-svn-id: trunk@14079 -
pierre 15 years ago
parent
commit
3f28cfafe2
2 changed files with 9 additions and 15 deletions
  1. 3 7
      compiler/Makefile
  2. 6 8
      compiler/Makefile.fpc

+ 3 - 7
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)

+ 6 - 8
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)