Browse Source

make: Get the git directory from RIOTBASE

This allows having applications outside of RIOT's own git directory and
still get the correct branch information for the build.
dev/timer
Iván Briano 8 years ago
parent
commit
5f4a5aecb2
  1. 4
      Makefile.include

4
Makefile.include

@ -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…
Cancel
Save