* Only update revision.inc if it is already present

git-svn-id: trunk@14079 -
This commit is contained in:
pierre 2009-11-06 11:13:42 +00:00
parent 6ed7d33569
commit 3f28cfafe2
2 changed files with 9 additions and 15 deletions

View File

@ -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)

View File

@ -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)