Make: do not spam error messages on shallow clones

> `--always`: Show uniquely abbreviated commit object as fallback.
This commit is contained in:
René Kijewski 2014-04-09 12:38:27 +02:00
parent ab08fbb5a6
commit 21af9f11f9

View File

@ -9,7 +9,7 @@ endif
OBJ = $(SRC:%.c=$(BINDIR)$(MODULE)/%.o)
DEP = $(SRC:%.c=$(BINDIR)$(MODULE)/%.d)
GIT_STRING := $(shell git describe --abbrev=4 --dirty=-`hostname`)
GIT_STRING := $(shell git describe --always --abbrev=4 --dirty=-`hostname`)
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
ifeq ($(strip $(GIT_BRANCH)),master)
GIT_VERSION = $(GIT_STRING)