Merge pull request #3732 from ibriano/gitdir
make: get the git directory from RIOTBASE
This commit is contained in:
commit
c14424fd0f
@ -167,9 +167,9 @@ include $(RIOTBASE)/Makefile.cflags
|
||||
|
||||
# make the RIOT version available to the program
|
||||
ifeq ($(origin RIOT_VERSION), undefined)
|
||||
GIT_STRING := $(shell git describe --always --abbrev=4 --dirty=-`hostname` 2> /dev/null)
|
||||
GIT_STRING := $(shell git --git-dir="$(RIOTBASE)/.git" describe --always --abbrev=4 --dirty=-`hostname` 2> /dev/null)
|
||||
ifneq (,$(GIT_STRING))
|
||||
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
|
||||
GIT_BRANCH := $(shell git --git-dir="$(RIOTBASE)/.git" rev-parse --abbrev-ref HEAD)
|
||||
ifeq ($(strip $(GIT_BRANCH)),master)
|
||||
RIOT_VERSION := $(GIT_STRING)
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user