[riot-notifications] [RIOT-OS/RIOT] build system: add machine-readable RIOT_VERSION_CODE macro (#16765)
notifications at github.com
Sat Aug 21 14:09:47 CEST 2021
The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.
### Contribution description
For external modules it can be handy to determine the RIOT version using a define.
Linux provides a `KERNEL_VERSION` macro for that. It splits a 32 bit version number into 16 bit mayor version, 8 bit minor version and 8 bit patch level.
This also works for RIOT's versioning scheme, so let's adopt the same scheme.
### Testing procedure
A new unit test is provided in `tests/unittests/tests-kernel_defines`.
### Issues/PRs references
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* core/include/kernel_defines.h: add KERNEL_VERSION macro
* tests/unittests: add test for kernel_defines
-- File Changes --
M Makefile.include (7)
M core/include/kernel_defines.h (12)
A tests/unittests/tests-kernel_defines/Makefile (1)
A tests/unittests/tests-kernel_defines/tests-kernel_defines.c (57)
A tests/unittests/tests-kernel_defines/tests-kernel_defines.h (37)
-- Patch Links --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications