Skip to content

Commit

Permalink
Merge pull request #1499 from LudwigOrtmann/riot-version-fail
Browse files Browse the repository at this point in the history
make: improve failing RIOT_VERSION
  • Loading branch information
Kijewski committed Jul 30, 2014
2 parents be6de6f + e677aa4 commit 23e1254
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile.include
Expand Up @@ -65,7 +65,7 @@ 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`)
GIT_STRING := $(shell git describe --always --abbrev=4 --dirty=-`hostname` 2> /dev/null)
ifneq (,$(GIT_STRING))
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
ifeq ($(strip $(GIT_BRANCH)),master)
Expand All @@ -74,7 +74,7 @@ ifeq ($(origin RIOT_VERSION), undefined)
RIOT_VERSION := $(GIT_STRING)-$(GIT_BRANCH)
endif
else
RIOT_VERSION := UNKNOWN
RIOT_VERSION := UNKNOWN (builddir: $(RIOTBASE))
endif
endif
export CFLAGS += -DRIOT_VERSION='"$(RIOT_VERSION)"'
Expand Down

0 comments on commit 23e1254

Please sign in to comment.