mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-14 20:02:38 +00:00
851a64d8c8
This requires a helper script: doxygen doesn't differ between static methods and static inline methods. EXTRACT_STATIC defines whether it parses *any* static method but we're currently using all C files as input files as well. We cannot convince doxygen to just parse static inline functions in header files so for SPA we hack around this: meson passes the spa headers to a shell script with simply copies those changed to `/* static */ inline void (foo)` and doxygen then runs on those header files. The result: we get all spa functions added to your doxygen output at the cost of a few sed calls.
19 lines
525 B
Bash
Executable file
19 lines
525 B
Bash
Executable file
#!/bin/bash
|
|
#
|
|
# Replicates the source tree at $SOURCE to $DEST with any static removed
|
|
# from the file. This allows Doxygen to parse the file and document static
|
|
# inline functions.
|
|
|
|
SOURCE="$1"
|
|
DEST="$2"
|
|
test -n "$SOURCE" || (echo "Source argument is missing" && exit 1)
|
|
test -n "$DEST" || (echo "Dest argument is missing" && exit 1)
|
|
|
|
echo "Reading from $SOURCE"
|
|
echo "Copying to $DEST"
|
|
|
|
mkdir -p "$DEST"
|
|
cp -rf "$SOURCE"/* "$DEST/"
|
|
shopt -s globstar # proper recursive globbing
|
|
sed -i 's|^static|/* \0 */|' "$DEST"/**/*.h
|