From e04850b27b484151ba093fab9392abbe1386abac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Mon, 1 Jul 2019 18:57:41 +0200 Subject: [PATCH] Makefile.include: remove RIOT_VERSION_OVERRIDE RIOT_VERSION is not used for building a specific RIOT version anymore since #10543. The variable can now be used directly. Add deprecation warning. --- Makefile.include | 15 ++++++++------- makefiles/buildtests.inc.mk | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile.include b/Makefile.include index d3b2eb8d7c..21b90424fd 100644 --- a/Makefile.include +++ b/Makefile.include @@ -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 @@ -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) @@ -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)) diff --git a/makefiles/buildtests.inc.mk b/makefiles/buildtests.inc.mk index f980630289..f135962cf8 100644 --- a/makefiles/buildtests.inc.mk +++ b/makefiles/buildtests.inc.mk @@ -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 \