mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-14 20:02:38 +00:00
doc: add Doxygen filter that adds docs to struct *method macros
Add an input filter that tries to link e.g. #define pw_core_add_listener(...) pw_core_method(c,add_listener,...) to the corresponding declaration in struct pw_core_methods.
This commit is contained in:
parent
4cb24531b3
commit
cd94eff5f2
|
@ -17,7 +17,7 @@ QUIET = YES
|
||||||
WARN_NO_PARAMDOC = YES
|
WARN_NO_PARAMDOC = YES
|
||||||
HAVE_DOT = @HAVE_DOT@
|
HAVE_DOT = @HAVE_DOT@
|
||||||
INPUT = @inputs@
|
INPUT = @inputs@
|
||||||
FILTER_PATTERNS = "*.c=@c_input_filter@"
|
FILTER_PATTERNS = "*.c=@c_input_filter@" "*.h=@h_input_filter@"
|
||||||
FILE_PATTERNS = "*.h" "*.c"
|
FILE_PATTERNS = "*.h" "*.c"
|
||||||
RECURSIVE = YES
|
RECURSIVE = YES
|
||||||
EXAMPLE_PATH = "@top_srcdir@/src/tools" \
|
EXAMPLE_PATH = "@top_srcdir@/src/tools" \
|
||||||
|
|
14
doc/input-filter-h.sh
Executable file
14
doc/input-filter-h.sh
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Doxygen input filter, which tries to fix documentation of callback
|
||||||
|
# method macros.
|
||||||
|
#
|
||||||
|
# This is used for .h files.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Add \sa and \copydoc for (struct *methods) callback macros.
|
||||||
|
# #define pw_core_add_listener(...) pw_core_method(c,add_listener,...) -> add \sa and \copydoc
|
||||||
|
# #define spa_system_read(...) spa_system_method_r(c,read,...) -> add \sa and \copydoc
|
||||||
|
sed -e 's@^\(#define .*[[:space:]]\)\(.*_method\)\((.,[[:space:]]*\)\([a-z_]\+\)\(.*)[[:space:]]*\)$@\1\2\3\4\5 /**< \\copydoc \2s.\4\n\n\\sa \2s.\4 */@;' \
|
||||||
|
-e 's@^\(#define .*[[:space:]]\)\(.*_method\)\(_[rvs](.,[[:space:]]*\)\([a-z_]\+\)\(.*)[[:space:]]*\)$@\1\2\3\4\5 /**< \\copydoc \2s.\4\n\n\\sa \2s.\4 */@;' \
|
||||||
|
< "$1"
|
|
@ -81,6 +81,7 @@ doxyfile_conf.set('inputs', ' '.join(inputs))
|
||||||
doxyfile_conf.set('cssfiles', ' '.join(cssfiles))
|
doxyfile_conf.set('cssfiles', ' '.join(cssfiles))
|
||||||
doxyfile_conf.set('path_prefixes', ' '.join(path_prefixes))
|
doxyfile_conf.set('path_prefixes', ' '.join(path_prefixes))
|
||||||
doxyfile_conf.set('c_input_filter', meson.source_root() / 'doc' / 'input-filter.sh')
|
doxyfile_conf.set('c_input_filter', meson.source_root() / 'doc' / 'input-filter.sh')
|
||||||
|
doxyfile_conf.set('h_input_filter', meson.source_root() / 'doc' / 'input-filter-h.sh')
|
||||||
|
|
||||||
doxyfile = configure_file(input: 'Doxyfile.in',
|
doxyfile = configure_file(input: 'Doxyfile.in',
|
||||||
output: 'Doxyfile',
|
output: 'Doxyfile',
|
||||||
|
|
Loading…
Reference in a new issue