Tag version commits and override CONTIKI_VERSION_STRING with git describe
This commit is contained in:
parent
758fc37307
commit
656e80b57a
|
@ -136,6 +136,14 @@ vpath %.S $(SOURCEDIRS)
|
||||||
|
|
||||||
CFLAGS += ${addprefix -I,$(SOURCEDIRS)}
|
CFLAGS += ${addprefix -I,$(SOURCEDIRS)}
|
||||||
|
|
||||||
|
### Check for a git repo and pass version if found
|
||||||
|
### git.exe in Windows cmd shells may require no stderr redirection
|
||||||
|
#RELSTR=${shell git describe --tags}
|
||||||
|
RELSTR=${shell git describe --tags 2>/dev/null}
|
||||||
|
ifneq ($(RELSTR),)
|
||||||
|
CFLAGS += -DCONTIKI_VERSION_STRING=\"Contiki-$(RELSTR)\"
|
||||||
|
endif
|
||||||
|
|
||||||
### Automatic dependency generation
|
### Automatic dependency generation
|
||||||
|
|
||||||
ifneq ($(MAKECMDGOALS),clean)
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
|
|
Loading…
Reference in a new issue