Skip to content

Commit

Permalink
Makefile.include: remove RIOT_VERSION_OVERRIDE
Browse files Browse the repository at this point in the history
RIOT_VERSION is not used for building a specific RIOT version anymore
since #10543. The variable can now be used directly.
Add deprecation warning.
  • Loading branch information
cladmi committed Aug 12, 2019
1 parent a9ab9d3 commit e04850b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ endif

# set some settings useful for continuous integration builds
ifeq ($(RIOT_CI_BUILD),1)
RIOT_VERSION_OVERRIDE:=buildtest
RIOT_VERSION ?= buildtest
ifneq ($(filter $(BOARD_INSUFFICIENT_MEMORY), $(BOARD)),)
$(info CI-build: skipping link step)
RIOTNOLINK:=1
Expand Down Expand Up @@ -353,6 +353,12 @@ include $(RIOTMAKE)/cflags.inc.mk
include $(RIOTMAKE)/git_version.inc.mk
RIOT_VERSION ?= $(or $(GIT_VERSION),'UNKNOWN (builddir: $(RIOTBASE))')

# Deprecate using RIOT_VERSION_OVERRIDE but currently keep the behavior
ifneq (,$(RIOT_VERSION_OVERRIDE))
$(warning 'RIOT_VERSION_OVERRIDE' is deprecated, it can now be set with 'RIOT_VERSION' directly.)
RIOT_VERSION = $(RIOT_VERSION_OVERRIDE)
endif

# Set module by prepending APPLICATION name with 'application_'.
# It prevents conflict with application and modules with the same name.
APPLICATION_MODULE ?= application_$(APPLICATION)
Expand Down Expand Up @@ -724,12 +730,7 @@ $(RIOTBUILD_CONFIG_HEADER_C): FORCE
# Immediate evaluation but keep CLAGS_WITH_MACROS deferred
_CFLAGS := $(CFLAGS)
CFLAGS_WITH_MACROS = $(_CFLAGS)

ifneq (,$(RIOT_VERSION_OVERRIDE))
CFLAGS_WITH_MACROS += -DRIOT_VERSION=\"$(RIOT_VERSION_OVERRIDE)\"
else
CFLAGS_WITH_MACROS += -DRIOT_VERSION=\"$(RIOT_VERSION)\"
endif
CFLAGS_WITH_MACROS += -DRIOT_VERSION=\"$(RIOT_VERSION)\"

CFLAGS := $(patsubst -D%,,$(CFLAGS))
CFLAGS := $(patsubst -U%,,$(CFLAGS))
Expand Down
2 changes: 1 addition & 1 deletion makefiles/buildtests.inc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildtest:
for board in $(BOARDS); do \
if BOARD=$${board} $(MAKE) check-toolchain-supported > /dev/null 2>&1; then \
$(COLOR_ECHO) -n "Building for $$board ... " ; \
BOARD=$${board} RIOT_CI_BUILD=1 RIOT_VERSION_OVERRIDE=buildtest \
BOARD=$${board} RIOT_CI_BUILD=1 \
$(MAKE) clean all -j $(NPROC) $(BUILDTEST_MAKE_REDIRECT); \
RES=$$? ; \
if [ $$RES -eq 0 ]; then \
Expand Down

0 comments on commit e04850b

Please sign in to comment.