mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
sys/shell: add RIOT_VERSION_EXTRA output
This allows to define an extra string that will be output as part of the version command. e.g. an application may define RIOT_VERSION_EXTRA += v1.33.7 RIOT_VERSION_EXTRA += flashed by $(shell whoami
This commit is contained in:
parent
8bf61336a2
commit
b729fe3237
@ -1072,6 +1072,9 @@ $(RIOTBUILD_CONFIG_HEADER_C).in: FORCE | $(CLEAN)
|
||||
CFLAGS_WITH_MACROS += $(CFLAGS)
|
||||
CFLAGS_WITH_MACROS += -DRIOT_VERSION=\"$(RIOT_VERSION)\"
|
||||
CFLAGS_WITH_MACROS += -DRIOT_VERSION_CODE=$(RIOT_VERSION_CODE)
|
||||
ifneq (,$(RIOT_VERSION_EXTRA))
|
||||
CFLAGS_WITH_MACROS += -DCONFIG_RIOT_VERSION_EXTRA=\""$(RIOT_VERSION_EXTRA)"\"
|
||||
endif
|
||||
# MODULE_NAME defines. Declared in 'makefiles/modules.inc.mk'
|
||||
CFLAGS_WITH_MACROS += $(EXTDEFINES)
|
||||
|
||||
|
@ -70,6 +70,9 @@ static int _version_handler(int argc, char **argv)
|
||||
printf("%s v%"PRIu32", slot %u\n", RIOT_APPLICATION, hdr->version, slot);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_RIOT_VERSION_EXTRA
|
||||
puts(CONFIG_RIOT_VERSION_EXTRA);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user