Merge pull request #117 from nfi/contrib/mark-version-as-modified

Updated the Contiki version and mark the version as modified if the working tree has local modifications.
This commit is contained in:
Simon Duquennoy 2017-10-27 16:56:49 +02:00 committed by GitHub
commit 66ee69b98c
1 changed files with 3 additions and 3 deletions

View File

@ -220,13 +220,13 @@ CFLAGS += ${addprefix -I,$(SOURCEDIRS) $(CONTIKI)}
### Check for a git repo and pass version if found ### Check for a git repo and pass version if found
### git.exe in Windows cmd shells may require no stderr redirection ### git.exe in Windows cmd shells may require no stderr redirection
ifndef RELSTR ifndef RELSTR
RELSTR:=${shell git --git-dir ${CONTIKI}/.git describe --tags --always} RELSTR:=${shell git --git-dir ${CONTIKI}/.git describe --tags --always --dirty}
endif endif
ifneq ($(RELSTR),) ifneq ($(RELSTR),)
CFLAGS += -DCONTIKI_VERSION_STRING=\"Contiki-$(RELSTR)\" CFLAGS += -DCONTIKI_VERSION_STRING=\"Contiki-NG-$(RELSTR)\"
else else
CFLAGS += -DCONTIKI_VERSION_STRING=\"Contiki-3.x\" CFLAGS += -DCONTIKI_VERSION_STRING=\"Contiki-NG\"
endif endif
### Automatic dependency generation ### Automatic dependency generation