Skip to content

Commit

Permalink
Merge pull request #20340 from benpicco/RIOT_VERSION_EXTRA
Browse files Browse the repository at this point in the history
sys/shell: add RIOT_VERSION_EXTRA output
  • Loading branch information
benpicco authored Feb 5, 2024
2 parents 6deca8b + b729fe3 commit 7bcad44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 3 additions & 0 deletions sys/shell/cmds/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7bcad44

Please sign in to comment.