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>
pull/72893/head
Yong Cong Sin1 year agocommitted byHenrik Brix Andersen
@ -104,7 +104,7 @@ if (${_work_mode} STREQUAL "C and CXX includes, defines in Eclipse with project
@@ -104,7 +104,7 @@ if (${_work_mode} STREQUAL "C and CXX includes, defines in Eclipse with project
@ -167,7 +167,7 @@ if ( (${_work_mode} STREQUAL "C and CXX includes, defines in .cproject without _
@@ -167,7 +167,7 @@ if ( (${_work_mode} STREQUAL "C and CXX includes, defines in .cproject without _
@ -42,7 +42,7 @@ CMake prints the input and output file locations like this:
@@ -42,7 +42,7 @@ CMake prints the input and output file locations like this:
-- Found BOARD.dts: .../zephyr/boards/arm/qemu_cortex_m3/qemu_cortex_m3.dts
@ -129,7 +129,7 @@ These are created in your application's build directory.
@@ -129,7 +129,7 @@ These are created in your application's build directory.
input to :file:`gen_defines.py` and used to create :file:`zephyr.dts` and
@ -203,7 +203,7 @@ A device-specific API definition typically looks like this:
@@ -203,7 +203,7 @@ A device-specific API definition typically looks like this:
__syscall int specific_from_user(const struct device *dev, int bar);
/* Only needed when extensions include syscalls */
#include <syscalls/specific.h>
#include <zephyr/syscalls/specific.h>
A driver implementing extensions to the subsystem will define the real
implementation of both the subsystem API and the specific APIs:
@ -243,7 +243,7 @@ implementation of both the subsystem API and the specific APIs:
@@ -243,7 +243,7 @@ implementation of both the subsystem API and the specific APIs:
@ -87,7 +87,7 @@ bottom of ``include/sensor.h``:
@@ -87,7 +87,7 @@ bottom of ``include/sensor.h``:
..code-block:: c
#include <syscalls/sensor.h>
#include <zephyr/syscalls/sensor.h>
C prototype functions must be declared in one of the directories
listed in the CMake variable ``SYSCALL_INCLUDE_DIRS``. This list
@ -143,7 +143,7 @@ C and header files by the :ref:`gen_syscalls.py` script, all of which can be fou
@@ -143,7 +143,7 @@ C and header files by the :ref:`gen_syscalls.py` script, all of which can be fou
the project out directory under ``include/generated/``:
* The system call is added to the enumerated type of system call IDs,
which is expressed in ``include/generated/syscall_list.h``. It is the name
which is expressed in ``include/generated/zephyr/syscall_list.h``. It is the name
of the API in uppercase, prefixed with ``K_SYSCALL_``.
* An entry for the system call is created in the dispatch table
@ -172,7 +172,7 @@ The body of the API is created in the generated system header. Using the
@@ -172,7 +172,7 @@ The body of the API is created in the generated system header. Using the
example of :c:func:`k_sem_init()`, this API is declared in
``include/kernel.h``. At the bottom of ``include/kernel.h`` is::
#include <syscalls/kernel.h>
#include <zephyr/syscalls/kernel.h>
Inside this header is the body of :c:func:`k_sem_init()`::
@ -362,7 +362,7 @@ For example:
@@ -362,7 +362,7 @@ For example:
@ -34,7 +34,7 @@ static inline int z_vrfy_auxdisplay_position_blinking_set_enabled(const struct d
@@ -34,7 +34,7 @@ static inline int z_vrfy_auxdisplay_position_blinking_set_enabled(const struct d