From 738999e191297c737fda647b5ba73e9897a581a8 Mon Sep 17 00:00:00 2001 From: Torsten Rasmussen Date: Fri, 26 Jan 2024 11:18:09 +0100 Subject: [PATCH] version: export tweak version in version.h The commit export TWEAK version to code through version.h. This aligns the symbols available in code with those available in CMake and Kconfig. The new define is available for both KERNEL, APP, and custom version types (such as MCUBOOT). Signed-off-by: Torsten Rasmussen --- doc/build/version/index.rst | 2 ++ version.h.in | 1 + 2 files changed, 3 insertions(+) diff --git a/doc/build/version/index.rst b/doc/build/version/index.rst index 8d169a85bf..ef702c7ac2 100644 --- a/doc/build/version/index.rst +++ b/doc/build/version/index.rst @@ -91,6 +91,8 @@ following defines are available: +--------------------+-------------------+------------------------------------------------------+-------------------------+ | APP_PATCHLEVEL | Numerical | ``PATCHLEVEL`` | 3 | +--------------------+-------------------+------------------------------------------------------+-------------------------+ +| APP_VERSION_TWEAK | Numerical | ``VERSION_TWEAK`` | 4 | ++--------------------+-------------------+------------------------------------------------------+-------------------------+ | APP_VERSION_STRING | String (quoted) | ``VERSION_MAJOR``, |br| | "1.2.3-unstable" | | | | ``VERSION_MINOR``, |br| | | | | | ``PATCHLEVEL``, |br| | | diff --git a/version.h.in b/version.h.in index c60fb72180..476d97eabb 100644 --- a/version.h.in +++ b/version.h.in @@ -14,6 +14,7 @@ #define @VERSION_TYPE@_VERSION_MAJOR @@VERSION_TYPE@_VERSION_MAJOR@ #define @VERSION_TYPE@_VERSION_MINOR @@VERSION_TYPE@_VERSION_MINOR@ #define @VERSION_TYPE@_PATCHLEVEL @@VERSION_TYPE@_PATCHLEVEL@ +#define @VERSION_TYPE@_TWEAK @@VERSION_TYPE@_VERSION_TWEAK@ #define @VERSION_TYPE@_VERSION_STRING "@@VERSION_TYPE@_VERSION_STRING@" #define @BUILD_VERSION_NAME@ @@BUILD_VERSION_NAME@@