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