* Fix REVSTR for windows OS

git-svn-id: trunk@14076 -
This commit is contained in:
pierre 2009-11-06 10:18:07 +00:00
parent 9bd672b3e4
commit b6d0a93599
2 changed files with 41 additions and 8 deletions

View File

@ -348,13 +348,18 @@ CPUSUF=arm
endif
NOCPUDEF=1
MSGFILE=msg/error$(FPCLANG).msg
SVNVERSION:=$(wildcard $(addsuffix /svnversion$(SRCEXEEXT),$(SEARCHPATH)))
ifeq ($(REVSTR),)
ifneq ($(SVNVERSION),)
REVSTR:=$(shell $(SVNVERSION) -c .)
export REVSTR
override LOCALOPT+=-dREVINC
endif
endif
REVINC:=$(wildcard revision.inc)
ifneq ($(REVINC),)
override LOCALOPT+=-dREVINC
ifeq ($(REVSTR),)
SVNVERSION:=$(wildcard svnversion$(SRCEXEEXT))
REVSTR:=$(shell svnversion .)
export REVSTR
override LOCALOPT+=-dREVINC
endif
endif
override LOCALOPT+=-d$(CPC_TARGET) -dGDB -dBROWSERLOG
@ -3335,7 +3340,16 @@ $(EXENAME) : $(wildcard *.pas) $(wildcard *.inc) msg \
$(wildcard systems/*.pas) $(wilcard systems/*.inc) \
$(wildcard $(CPC_TARGET)/*.pas) $(wildcard $(CPC_TARGET)/*.inc)
ifneq ($(REVSTR),)
ifdef USEZIPWRAPPER
ifneq ($(ECHOREDIR),echo)
$(ECHOREDIR) "'$(REVSTR)'" > revision.inc
else
$(ECHOREDIR) '$(REVSTR)' > revision.inc
endif
else
$(ECHOREDIR) "'$(REVSTR)'" > revision.inc
endif
$(COMPILER) version.pas
endif
$(COMPILER) pp.pas
$(EXECPPAS)

View File

@ -150,13 +150,22 @@ NOCPUDEF=1
# Default message file
MSGFILE=msg/error$(FPCLANG).msg
# Automatically update revision.inc if
# svnversion executable is available
SVNVERSION:=$(wildcard $(addsuffix /svnversion$(SRCEXEEXT),$(SEARCHPATH)))
ifeq ($(REVSTR),)
ifneq ($(SVNVERSION),)
REVSTR:=$(shell $(SVNVERSION) -c .)
export REVSTR
override LOCALOPT+=-dREVINC
endif
endif
REVINC:=$(wildcard revision.inc)
ifneq ($(REVINC),)
override LOCALOPT+=-dREVINC
ifeq ($(REVSTR),)
SVNVERSION:=$(wildcard svnversion$(SRCEXEEXT))
REVSTR:=$(shell svnversion .)
export REVSTR
override LOCALOPT+=-dREVINC
endif
endif
@ -373,11 +382,21 @@ regdatarm : arm/armreg.dat
cd arm && ../utils/mkarmreg$(SRCEXEEXT)
# Make only the compiler
# ECHOREDIR sometimes does not remove double quotes
$(EXENAME) : $(wildcard *.pas) $(wildcard *.inc) msg \
$(wildcard systems/*.pas) $(wilcard systems/*.inc) \
$(wildcard $(CPC_TARGET)/*.pas) $(wildcard $(CPC_TARGET)/*.inc)
ifneq ($(REVSTR),)
ifdef USEZIPWRAPPER
ifneq ($(ECHOREDIR),echo)
$(ECHOREDIR) "'$(REVSTR)'" > revision.inc
else
$(ECHOREDIR) '$(REVSTR)' > revision.inc
endif
else
$(ECHOREDIR) "'$(REVSTR)'" > revision.inc
endif
$(COMPILER) version.pas
endif
$(COMPILER) pp.pas
$(EXECPPAS)