build: make non zephyr/ include prefix configurable

Add a Kconfig to disable non prefixed includes. By setting
`CONFIG_LEGACY_INCLUDE_PATH=n` developers can disable having
`include/zephyr` in the search path. This means that includes such
as `#include <kernel.h>` will no longer work.

Internally, every header should be updated to add the `zephyr/`
prefix to the headers. Only then, will developers be able to use
this config value for their applications.

Signed-off-by: Yuval Peress <peress@google.com>
This commit is contained in:
Yuval Peress 2022-03-31 21:05:42 -06:00 committed by Carles Cufí
commit 1ec0c6f530
9 changed files with 30 additions and 8 deletions

View file

@ -928,8 +928,8 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
EXCLUDE = @ZEPHYR_BASE@/include/portability/cmsis_os.h \
@ZEPHYR_BASE@/include/portability/cmsis_os2.h
EXCLUDE = @ZEPHYR_BASE@/include/zephyr/portability/cmsis_os.h \
@ZEPHYR_BASE@/include/zephyr/portability/cmsis_os2.h
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded