Skip to content

Commit

Permalink
squash! Makefile.include: remove RIOT_VERSION_OVERRIDE
Browse files Browse the repository at this point in the history
Add deprecation warning.
  • Loading branch information
cladmi committed Jul 29, 2019
1 parent 10034d7 commit e4d34ee
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -721,15 +721,16 @@ $(RIOTBUILD_CONFIG_HEADER_C): FORCE
$(Q)'$(RIOTTOOLS)/genconfigheader/genconfigheader.sh' $(CFLAGS_WITH_MACROS) \
| '$(LAZYSPONGE)' $(LAZYSPONGE_FLAGS) '$@'

# 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

# 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

0 comments on commit e4d34ee

Please sign in to comment.