Skip to content

Commit ee173ab

Browse files
kartbendanieldegrasse
authored andcommitted
doc: doxygen: use STRIP_FROM_INC_PATH to keep #includes clean
Another take on #76953. This uses STRIP_FROM_INC_PATH to make sure #include snippets in the documentation are not absolute paths and reflect what one would actually use in their code. Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
1 parent fb9783d commit ee173ab

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

doc/zephyr.doxyfile.in

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,17 @@ STRIP_FROM_PATH = @ZEPHYR_BASE@/include
189189
# specify the list of include paths that are normally passed to the compiler
190190
# using the -I flag.
191191

192-
STRIP_FROM_INC_PATH =
192+
# TODO: Once https://github.com/doxygen/doxygen/pull/11657 is accepted and
193+
# available in a released Doxygen version, the entry
194+
# "@ZEPHYR_BASE@/lib/libc/minimal/include/" should be added to this list.
195+
# In the meantime, API from headers contained in this folder (e.g. errno.h) will
196+
# continue to show incorrect include path in the generated docs.
197+
198+
STRIP_FROM_INC_PATH = @ZEPHYR_BASE@/include/ \
199+
@ZEPHYR_BASE@/kernel/include/ \
200+
@ZEPHYR_BASE@/subsys/testsuite/include/ \
201+
@ZEPHYR_BASE@/subsys/secure_storage/include/internal \
202+
@ZEPHYR_BASE@/subsys/secure_storage/include
193203

194204
# If the SHORT_NAMES tag is set to YES, Doxygen will generate much shorter (but
195205
# less readable) file names. This can be useful is your file systems doesn't
@@ -996,6 +1006,10 @@ WARN_LOGFILE =
9961006
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
9971007
# Note: If this tag is empty the current directory is searched.
9981008

1009+
# Note that when adding paths to INPUT you most likely want to add them
1010+
# to STRIP_FROM_INC_PATH as well, which will remove those parts from
1011+
# the paths of the #include examples in the generated documentation.
1012+
9991013
INPUT = @ZEPHYR_BASE@/doc/_doxygen/mainpage.md \
10001014
@ZEPHYR_BASE@/doc/_doxygen/groups.dox \
10011015
@ZEPHYR_BASE@/kernel/include/kernel_arch_interface.h \

0 commit comments

Comments
 (0)