mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-15 02:49:36 +02:00
Try to avoid infinite loop for revision target on svn repo
This commit is contained in:
parent
ae8972083f
commit
810de9eaca
@ -574,32 +574,33 @@ endif
|
||||
REVINC:=$(wildcard revision.inc)
|
||||
ifneq ($(REVINC),)
|
||||
override LOCALOPT+=-dREVINC
|
||||
ifeq ($(REVSTR),)
|
||||
ifneq ($(wildcard ../.git),)
|
||||
ifneq ($(GIT),)
|
||||
ifeq ($(REVSTR),)
|
||||
ifneq ($(wildcard ../.git),)
|
||||
ifneq ($(GIT),)
|
||||
GITDESCRIBE=$(shell $(GIT) describe --dirty)
|
||||
REVSTR:=$(word 2,$(subst -, ,$(GITDESCRIBE)))-$(word 3,$(subst -, ,$(GITDESCRIBE)))
|
||||
ifneq ($(shell $(GIT) log @{u}..),)
|
||||
ifneq ($(shell $(GIT) log @{u}..),)
|
||||
REVSTR:=$(REVSTR)-unpushed
|
||||
endif
|
||||
ifneq ($(word 4,$(subst -, ,$(GITDESCRIBE))),)
|
||||
endif
|
||||
ifneq ($(word 4,$(subst -, ,$(GITDESCRIBE))),)
|
||||
REVSTR:=$(REVSTR)-$(word 4,$(subst -, ,$(GITDESCRIBE)))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
export REVSTR
|
||||
else
|
||||
ifneq ($(SVNVERSION),)
|
||||
else
|
||||
ifneq ($(SVNVERSION),)
|
||||
REVSTR:=$(subst r,,$(subst r1:,,r$(subst exported,,$(shell $(SVNVERSION) -c .))))
|
||||
export REVSTR
|
||||
else
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($(REVINC),force)
|
||||
ifeq ($(REVSTR),)
|
||||
REVSTR:=exported
|
||||
export REVSTR
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
override LOCALOPT+=-d$(CPC_TARGET) -dGDB
|
||||
ifdef LLVM
|
||||
ifeq ($(findstring $(PPC_TARGET),x86_64 aarch64 arm),)
|
||||
|
@ -315,32 +315,35 @@ ifneq ($(REVINC),)
|
||||
override LOCALOPT+=-dREVINC
|
||||
# Automatically update revision.inc if
|
||||
# svnversion executable is available
|
||||
ifeq ($(REVSTR),)
|
||||
ifneq ($(wildcard ../.git),)
|
||||
ifneq ($(GIT),)
|
||||
ifeq ($(REVSTR),)
|
||||
ifneq ($(wildcard ../.git),)
|
||||
ifneq ($(GIT),)
|
||||
GITDESCRIBE=$(shell $(GIT) describe --dirty)
|
||||
REVSTR:=$(word 2,$(subst -, ,$(GITDESCRIBE)))-$(word 3,$(subst -, ,$(GITDESCRIBE)))
|
||||
ifneq ($(shell $(GIT) log @{u}..),)
|
||||
ifneq ($(shell $(GIT) log @{u}..),)
|
||||
REVSTR:=$(REVSTR)-unpushed
|
||||
endif
|
||||
ifneq ($(word 4,$(subst -, ,$(GITDESCRIBE))),)
|
||||
endif
|
||||
ifneq ($(word 4,$(subst -, ,$(GITDESCRIBE))),)
|
||||
REVSTR:=$(REVSTR)-$(word 4,$(subst -, ,$(GITDESCRIBE)))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
export REVSTR
|
||||
else
|
||||
ifneq ($(SVNVERSION),)
|
||||
else
|
||||
ifneq ($(SVNVERSION),)
|
||||
REVSTR:=$(subst r,,$(subst r1:,,r$(subst exported,,$(shell $(SVNVERSION) -c .))))
|
||||
export REVSTR
|
||||
else
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Avoid infinite loop
|
||||
ifeq ($(REVINC),force)
|
||||
ifeq ($(REVSTR),)
|
||||
REVSTR:=exported
|
||||
export REVSTR
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# set correct defines (-d$(CPU_TARGET) is automatically added in makefile.fpc)
|
||||
override LOCALOPT+=-d$(CPC_TARGET) -dGDB
|
||||
|
Loading…
Reference in New Issue
Block a user