]> git.ipfire.org Git - thirdparty/systemd.git/blob - tools/meson-check-api-docs.sh
test-network: use wait-online in NetworkdBondTests
[thirdparty/systemd.git] / tools / meson-check-api-docs.sh
1 #!/bin/sh
2 set -eu
3
4 sd_good=0
5 sd_total=0
6 udev_good=0
7 udev_total=0
8
9 for symbol in `nm -g --defined-only "$@" | grep " T " | cut -d" " -f3 | sort -u` ; do
10 if test -f ${MESON_BUILD_ROOT}/man/$symbol.3 ; then
11 echo "✓ Symbol $symbol() is documented."
12 good=1
13 else
14 printf " \x1b[1;31mSymbol $symbol() lacks documentation.\x1b[0m\n"
15 good=0
16 fi
17
18 case $symbol in
19 sd_*)
20 ((sd_good+=good))
21 ((sd_total+=1))
22 ;;
23 udev_*)
24 ((udev_good+=good))
25 ((udev_total+=1))
26 ;;
27 *)
28 echo 'unknown symbol prefix'
29 exit 1
30 esac
31 done
32
33 echo "libsystemd: $sd_good/$sd_total libudev: $udev_good/$udev_total"