diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d5c643f3e4911b..0f5a217977cb775 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -552,9 +552,9 @@ if(ZEPHYR_GIT_INDEX) endif() add_custom_command( - OUTPUT ${PROJECT_BINARY_DIR}/include/generated/version.h + OUTPUT ${PROJECT_BINARY_DIR}/include/generated/zephyr/version.h COMMAND ${CMAKE_COMMAND} -DZEPHYR_BASE=${ZEPHYR_BASE} - -DOUT_FILE=${PROJECT_BINARY_DIR}/include/generated/version.h + -DOUT_FILE=${PROJECT_BINARY_DIR}/include/generated/zephyr/version.h -DVERSION_TYPE=KERNEL -DVERSION_FILE=${ZEPHYR_BASE}/VERSION -DKERNEL_VERSION_CUSTOMIZATION="${KERNEL_VERSION_CUSTOMIZATION}" @@ -562,7 +562,15 @@ add_custom_command( -P ${ZEPHYR_BASE}/cmake/gen_version_h.cmake DEPENDS ${ZEPHYR_BASE}/VERSION ${git_dependency} ) -add_custom_target(version_h DEPENDS ${PROJECT_BINARY_DIR}/include/generated/version.h) +add_custom_target(version_h DEPENDS ${PROJECT_BINARY_DIR}/include/generated/zephyr/version.h) + +FILE(WRITE ${PROJECT_BINARY_DIR}/include/generated/version.h +"#ifndef _DEPRECATED_KERNEL_VERSION_H_\n" +"#define _DEPRECATED_KERNEL_VERSION_H_\n\n" +"#include \n\n" +"#warning \" is deprecated, include instead\"\n\n" +"#endif /* _DEPRECATED_KERNEL_VERSION_H_ */\n" +) if(EXISTS ${APPLICATION_SOURCE_DIR}/VERSION) add_custom_command( @@ -1882,7 +1890,7 @@ if(log_dict_db_output) ${ZEPHYR_BASE}/scripts/logging/dictionary/database_gen.py ${KERNEL_ELF_NAME} ${log_dict_db_output} - --build-header ${PROJECT_BINARY_DIR}/include/generated/version.h + --build-header ${PROJECT_BINARY_DIR}/include/generated/zephyr/version.h ) list(APPEND post_build_byproducts diff --git a/drivers/fpga/fpga_shell.c b/drivers/fpga/fpga_shell.c index 7969e231c6477b2..36d1cb83da43502 100644 --- a/drivers/fpga/fpga_shell.c +++ b/drivers/fpga/fpga_shell.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include diff --git a/include/zephyr/usb/usb_ch9.h b/include/zephyr/usb/usb_ch9.h index fa18b1c2dc833b2..05f53c413212360 100644 --- a/include/zephyr/usb/usb_ch9.h +++ b/include/zephyr/usb/usb_ch9.h @@ -12,7 +12,7 @@ * and follows, with few exceptions, the USB Specification 2.0. */ -#include +#include #include #include diff --git a/kernel/banner.c b/kernel/banner.c index a9925ea7b54334e..686d01f77fd4930 100644 --- a/kernel/banner.c +++ b/kernel/banner.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #if defined(CONFIG_BOOT_DELAY) && (CONFIG_BOOT_DELAY > 0) #define DELAY_STR STRINGIFY(CONFIG_BOOT_DELAY) diff --git a/kernel/version.c b/kernel/version.c index 799e555f1aaa5ef..029671f8259e003 100644 --- a/kernel/version.c +++ b/kernel/version.c @@ -5,7 +5,7 @@ */ #include -#include "version.h" /* generated by MAKE, at compile time */ +#include /* generated by MAKE, at compile time */ /** * @brief Return the kernel version of the present build diff --git a/lib/posix/uname.c b/lib/posix/uname.c index 107126f584ee122..1c33e2ca3e1bd8f 100644 --- a/lib/posix/uname.c +++ b/lib/posix/uname.c @@ -4,11 +4,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "version.h" #include #include #include #include +#include #ifdef CONFIG_NET_HOSTNAME_ENABLE #define UTSNAME_NODENAME CONFIG_NET_HOSTNAME diff --git a/samples/subsys/shell/shell_module/src/main.c b/samples/subsys/shell/shell_module/src/main.c index a3248cc7dc34ea2..c7519c7485c653b 100644 --- a/samples/subsys/shell/shell_module/src/main.c +++ b/samples/subsys/shell/shell_module/src/main.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include diff --git a/subsys/bindesc/bindesc_version.c b/subsys/bindesc/bindesc_version.c index d1c3a905aa046de..fb7571d3fcb7728 100644 --- a/subsys/bindesc/bindesc_version.c +++ b/subsys/bindesc/bindesc_version.c @@ -6,7 +6,7 @@ #include #include -#include +#include #if IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_STRING) BINDESC_STR_DEFINE(kernel_version_string, BINDESC_ID_KERNEL_VERSION_STRING, diff --git a/subsys/bluetooth/controller/hci/hci.c b/subsys/bluetooth/controller/hci/hci.c index c3dd070720b153e..e4a2cf1e39741eb 100644 --- a/subsys/bluetooth/controller/hci/hci.c +++ b/subsys/bluetooth/controller/hci/hci.c @@ -8,7 +8,6 @@ #include #include -#include #include #include @@ -20,6 +19,7 @@ #include #include #include +#include #include "../host/hci_ecc.h" diff --git a/subsys/mgmt/mcumgr/grp/os_mgmt/src/os_mgmt.c b/subsys/mgmt/mcumgr/grp/os_mgmt/src/os_mgmt.c index a42e2f4022fd42d..db5a378d92e9dc5 100644 --- a/subsys/mgmt/mcumgr/grp/os_mgmt/src/os_mgmt.c +++ b/subsys/mgmt/mcumgr/grp/os_mgmt/src/os_mgmt.c @@ -35,7 +35,7 @@ #if defined(CONFIG_MCUMGR_GRP_OS_INFO) || defined(CONFIG_MCUMGR_GRP_OS_BOOTLOADER_INFO) #include -#include +#include #if defined(CONFIG_MCUMGR_GRP_OS_INFO) #include #endif diff --git a/tests/kernel/common/src/main.c b/tests/kernel/common/src/main.c index e618d882094d4b8..352ae87ffeda9ac 100644 --- a/tests/kernel/common/src/main.c +++ b/tests/kernel/common/src/main.c @@ -8,7 +8,7 @@ #include #include #include -#include "version.h" +#include /** * @defgroup kernel_common_tests Common Tests diff --git a/tests/subsys/bindesc/definition/src/main.c b/tests/subsys/bindesc/definition/src/main.c index 487fa186790ba64..a112cc377504cae 100644 --- a/tests/subsys/bindesc/definition/src/main.c +++ b/tests/subsys/bindesc/definition/src/main.c @@ -6,7 +6,7 @@ #include #include -#include +#include #define STR_ID 1 #define UINT_ID 2 diff --git a/tests/subsys/mgmt/mcumgr/cb_notifications/src/main.c b/tests/subsys/mgmt/mcumgr/cb_notifications/src/main.c index 50ac67d43b23fc3..9ca0882a22808f8 100644 --- a/tests/subsys/mgmt/mcumgr/cb_notifications/src/main.c +++ b/tests/subsys/mgmt/mcumgr/cb_notifications/src/main.c @@ -10,11 +10,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include "smp_test_util.h" diff --git a/tests/subsys/mgmt/mcumgr/os_mgmt_info/src/build_date.c b/tests/subsys/mgmt/mcumgr/os_mgmt_info/src/build_date.c index 4af977895c3173d..54d668a06c2d044 100644 --- a/tests/subsys/mgmt/mcumgr/os_mgmt_info/src/build_date.c +++ b/tests/subsys/mgmt/mcumgr/os_mgmt_info/src/build_date.c @@ -13,12 +13,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include "smp_test_util.h" diff --git a/tests/subsys/mgmt/mcumgr/os_mgmt_info/src/limited.c b/tests/subsys/mgmt/mcumgr/os_mgmt_info/src/limited.c index f88997343514a46..847198d2230ae56 100644 --- a/tests/subsys/mgmt/mcumgr/os_mgmt_info/src/limited.c +++ b/tests/subsys/mgmt/mcumgr/os_mgmt_info/src/limited.c @@ -12,12 +12,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include #include "smp_test_util.h" diff --git a/tests/subsys/mgmt/mcumgr/os_mgmt_info/src/main.c b/tests/subsys/mgmt/mcumgr/os_mgmt_info/src/main.c index 8ffc2a354b80704..98d340d779fdb9c 100644 --- a/tests/subsys/mgmt/mcumgr/os_mgmt_info/src/main.c +++ b/tests/subsys/mgmt/mcumgr/os_mgmt_info/src/main.c @@ -12,12 +12,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include #include "smp_test_util.h"