Merge pull request #307 from nbraud/scver.mk
Fixup build/scver.mk and allow explicitly specifying the VERSION_ID
This commit is contained in:
commit
d92e14cbc4
|
@ -98,8 +98,12 @@ endif
|
||||||
GITPRESENT := $(wildcard $(FDBDIR)/.git)
|
GITPRESENT := $(wildcard $(FDBDIR)/.git)
|
||||||
HGPRESENT := $(wildcard $(FDBDIR)/.hg)
|
HGPRESENT := $(wildcard $(FDBDIR)/.hg)
|
||||||
|
|
||||||
|
# Do not override version IDs if already set
|
||||||
|
ifneq ($(VERSION_ID),)
|
||||||
|
# Noop
|
||||||
|
|
||||||
# Use Git, if not missing
|
# Use Git, if not missing
|
||||||
ifneq ($(GITPRESENT),)
|
else ifneq ($(GITPRESENT),)
|
||||||
SCVER := $(shell cd "$(FDBDIR)" && git --version 2>/dev/null)
|
SCVER := $(shell cd "$(FDBDIR)" && git --version 2>/dev/null)
|
||||||
ifneq ($(SCVER),)
|
ifneq ($(SCVER),)
|
||||||
VERSION_ID := $(shell cd "$(FDBDIR)" && git rev-parse --verify HEAD)
|
VERSION_ID := $(shell cd "$(FDBDIR)" && git rev-parse --verify HEAD)
|
||||||
|
@ -108,22 +112,22 @@ ifneq ($(GITPRESENT),)
|
||||||
else
|
else
|
||||||
$(error Missing git executable on $(PLATFORM) )
|
$(error Missing git executable on $(PLATFORM) )
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Otherwise, use Mercurial
|
# Otherwise, use Mercurial
|
||||||
else
|
else ifneq ($(HGPRESENT),)
|
||||||
# Otherwise, use Mercurial, if not missing
|
SCVER := $(shell cd "$(FDBDIR)" && hg --version 2>/dev/null)
|
||||||
ifneq ($(HGPRESENT),)
|
ifdef SCVER
|
||||||
SCVER := $(shell cd "$(FDBDIR)" && hg --version 2>/dev/null)
|
VERSION_ID := $(shell cd "$(FDBDIR)" && hg id -n)
|
||||||
ifdef SCVER
|
SOURCE_CONTROL := MERCURIAL
|
||||||
VERSION_ID := $(shell cd "$(FDBDIR)" && hg id -n)
|
SCBRANCH := $(shell cd "$(FDBDIR)" && hg branch)
|
||||||
SOURCE_CONTROL := MERCURIAL
|
|
||||||
SCBRANCH := $(shell cd "$(FDBDIR)" && hg branch)
|
|
||||||
else
|
|
||||||
$(error Missing hg executable on $(PLATFORM))
|
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
FDBFILES := (shell ls -la $(FDBDIR))
|
$(error Missing hg executable on $(PLATFORM))
|
||||||
$(error Missing source control information for source on $(PLATFORM) in directory: $(FDBDIR) with files: $(FDBFILES))
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# No version control system
|
||||||
|
else
|
||||||
|
FDBFILES := $(shell ls -la $(FDBDIR))
|
||||||
|
$(error Missing source control information for source on $(PLATFORM) in directory: $(FDBDIR) with files: $(FDBFILES))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Set the RELEASE variable based on the KVRELEASE variable.
|
# Set the RELEASE variable based on the KVRELEASE variable.
|
||||||
|
|
Loading…
Reference in New Issue