From 5a598b64b4f9da244765851e1b9882776b07289c Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Tue, 19 May 2015 18:29:04 +0200 Subject: [PATCH] make: introduce RIOT_VERSION_OVERRIDE Allows overriding of -DRIOT_VERSION regardless of the version actually used. Necessary for reproducable compiles. --- Makefile.include | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile.include b/Makefile.include index ec150b30f0..8fe6fc825b 100644 --- a/Makefile.include +++ b/Makefile.include @@ -152,7 +152,12 @@ ifeq ($(origin RIOT_VERSION), undefined) RIOT_VERSION := "UNKNOWN (builddir: $(RIOTBASE))" endif endif + +ifneq (,$(RIOT_VERSION_OVERRIDE)) +export CFLAGS += -DRIOT_VERSION=\"$(RIOT_VERSION_OVERRIDE)\" +else export CFLAGS += -DRIOT_VERSION=\"$(RIOT_VERSION)\" +endif # the binaries to link BASELIBS += $(BINDIR)$(BOARD)_base.a