Skip to content
Snippets Groups Projects
Commit 919cddef authored by René Kijewski's avatar René Kijewski
Browse files

make: rename VERSION into RIOT_VERSION

Building MSP boards gives an error, because `VERSION` is somewhere
defined in their toolchain as an integer.

This PR renames `VERSION` into `RIOT_VERSION`, because that's what it
is.
parent a6e97a4f
No related branches found
No related tags found
No related merge requests found
...@@ -65,16 +65,17 @@ include $(RIOTBASE)/Makefile.cflags ...@@ -65,16 +65,17 @@ include $(RIOTBASE)/Makefile.cflags
# make the RIOT version available to the program # make the RIOT version available to the program
GIT_STRING := $(shell git describe --always --abbrev=4 --dirty=-`hostname`) GIT_STRING := $(shell git describe --always --abbrev=4 --dirty=-`hostname`)
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD) ifneq (,$(GIT_STRING))
ifeq ($(strip $(GIT_BRANCH)),master) GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
GIT_VERSION = $(GIT_STRING) ifeq ($(strip $(GIT_BRANCH)),master)
RIOT_VERSION := $(GIT_STRING)
else
RIOT_VERSION := $(GIT_STRING)-$(GIT_BRANCH)
endif
else else
GIT_VERSION = $(shell echo $(GIT_STRING) $(GIT_BRANCH) | sed 's/ /-/') RIOT_VERSION := UNKNOWN
endif endif
ifeq ($(strip $(GIT_VERSION)),) export CFLAGS += -DRIOT_VERSION='"$(RIOT_VERSION)"'
GIT_VERSION := "UNKNOWN"
endif
export CFLAGS += -DVERSION=\"$(GIT_VERSION)\"
# the binaries to link # the binaries to link
BASELIBS += $(BINDIR)$(BOARD)_base.a BASELIBS += $(BINDIR)$(BOARD)_base.a
......
...@@ -85,7 +85,7 @@ static char idle_stack[KERNEL_CONF_STACKSIZE_IDLE]; ...@@ -85,7 +85,7 @@ static char idle_stack[KERNEL_CONF_STACKSIZE_IDLE];
void kernel_init(void) void kernel_init(void)
{ {
dINT(); dINT();
printf("kernel_init(): This is RIOT! (Version: %s)\n", VERSION); printf("kernel_init(): This is RIOT! (Version: %s)\n", RIOT_VERSION);
hwtimer_init(); hwtimer_init();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment