From 5d1ed3c17f8c97bb01f57363e7e442fda7f65f1b Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sun, 1 Apr 2018 16:15:02 +0100 Subject: [PATCH] Fix CONTIKI_VERSION_STRING Currently, the version string always ends with -dirty. This is related to the logic behind --git-dir, which assumes that the current working dir is the top-level dir of the repo, unless --work-tree is also specified --- Makefile.include | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.include b/Makefile.include index a37c5ad6a..39ec53974 100644 --- a/Makefile.include +++ b/Makefile.include @@ -263,7 +263,8 @@ CFLAGS += ${addprefix -I,$(SOURCEDIRS) $(CONTIKI)} ### Check for a git repo and pass version if found ### git.exe in Windows cmd shells may require no stderr redirection ifndef RELSTR -RELSTR:=${shell git --git-dir ${CONTIKI}/.git describe --tags --always --dirty} +RELSTR:=${shell git --git-dir ${CONTIKI}/.git --work-tree ${CONTIKI} describe \ + --tags --always --dirty} endif ifneq ($(RELSTR),)