build: namespace the generated headers with zephyr/

Namespaced the generated headers with `zephyr` to prevent
potential conflict with other headers.

Introduce a temporary Kconfig `LEGACY_GENERATED_INCLUDE_PATH`
that is enabled by default. This allows the developers to
continue the use of the old include paths for the time being
until it is deprecated and eventually removed. The Kconfig will
generate a build-time warning message, similar to the
`CONFIG_TIMER_RANDOM_GENERATOR`.

Updated the includes path of in-tree sources accordingly.

Most of the changes here are scripted, check the PR for more
info.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
This commit is contained in:
Yong Cong Sin 2024-01-24 17:35:04 +08:00 committed by Henrik Brix Andersen
commit bbe5e1e6eb
294 changed files with 770 additions and 726 deletions

View file

@ -6,7 +6,7 @@
#include <zephyr/ztest.h>
#include <zephyr/bindesc.h>
#include <version.h>
#include <zephyr/version.h>
#define STR_ID 1
#define UINT_ID 2

View file

@ -16,4 +16,4 @@ __syscall int ext_syscall_ok(int a);
*/
__syscall void ext_syscall_fail(void);
#include <syscalls/syscalls_ext.h>
#include <zephyr/syscalls/syscalls_ext.h>

View file

@ -61,7 +61,7 @@ static inline int z_vrfy_ext_syscall_ok(int a)
{
return z_impl_ext_syscall_ok(a);
}
#include <syscalls/ext_syscall_ok_mrsh.c>
#include <zephyr/syscalls/ext_syscall_ok_mrsh.c>
#endif /* CONFIG_USERSPACE */

View file

@ -31,7 +31,7 @@ static inline void z_vrfy_test_helpers_log_setup(void)
{
return z_impl_test_helpers_log_setup();
}
#include <syscalls/test_helpers_log_setup_mrsh.c>
#include <zephyr/syscalls/test_helpers_log_setup_mrsh.c>
#endif
int z_impl_test_helpers_cycle_get(void)
@ -44,7 +44,7 @@ static inline int z_vrfy_test_helpers_cycle_get(void)
{
return z_impl_test_helpers_cycle_get();
}
#include <syscalls/test_helpers_cycle_get_mrsh.c>
#include <zephyr/syscalls/test_helpers_cycle_get_mrsh.c>
#endif
bool z_impl_test_helpers_log_dropped_pending(void)
@ -57,5 +57,5 @@ static inline bool z_vrfy_test_helpers_log_dropped_pending(void)
{
return z_impl_test_helpers_log_dropped_pending();
}
#include <syscalls/test_helpers_log_dropped_pending_mrsh.c>
#include <zephyr/syscalls/test_helpers_log_dropped_pending_mrsh.c>
#endif

View file

@ -12,6 +12,6 @@ __syscall void test_helpers_log_setup(void);
__syscall int test_helpers_cycle_get(void);
__syscall bool test_helpers_log_dropped_pending(void);
#include <syscalls/test_helpers.h>
#include <zephyr/syscalls/test_helpers.h>
#endif /* SRC_TEST_HELPERS_H__ */

View file

@ -14,7 +14,7 @@
#include <zcbor_decode.h>
#include <zcbor_encode.h>
#include <mgmt/mcumgr/util/zcbor_bulk.h>
#include <version.h>
#include <zephyr/version.h>
#include <string.h>
#include <smp_internal.h>
#include "smp_test_util.h"

View file

@ -18,7 +18,7 @@
#include <zcbor_decode.h>
#include <zcbor_encode.h>
#include <mgmt/mcumgr/util/zcbor_bulk.h>
#include <version.h>
#include <zephyr/version.h>
#include <smp_internal.h>
#include "smp_test_util.h"

View file

@ -17,7 +17,7 @@
#include <zcbor_decode.h>
#include <zcbor_encode.h>
#include <mgmt/mcumgr/util/zcbor_bulk.h>
#include <version.h>
#include <zephyr/version.h>
#include <string.h>
#include <smp_internal.h>
#include "smp_test_util.h"

View file

@ -17,7 +17,7 @@
#include <zcbor_decode.h>
#include <zcbor_encode.h>
#include <mgmt/mcumgr/util/zcbor_bulk.h>
#include <version.h>
#include <zephyr/version.h>
#include <string.h>
#include <smp_internal.h>
#include "smp_test_util.h"

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <version.h>
#include <zephyr/version.h>
#include <zephyr/device.h>
#include <zephyr/devicetree.h>