1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00
systemd-stable/tools/meson-check-api-docs.sh

41 lines
902 B
Bash
Raw Normal View History

#!/bin/sh
set -eu
2018-07-27 11:32:20 +03:00
sd_good=0
sd_total=0
udev_good=0
udev_total=0
deprecated="
-e sd_bus_try_close
-e sd_bus_process_priority
-e sd_bus_message_get_priority
-e sd_bus_message_set_priority
"
for symbol in `nm -g --defined-only "$@" | grep " T " | cut -d" " -f3 | grep -wv $deprecated | sort -u` ; do
if test -f ${MESON_BUILD_ROOT}/man/$symbol.3 ; then
echo "✓ Symbol $symbol() is documented."
good=1
else
printf " \x1b[1;31mSymbol $symbol() lacks documentation.\x1b[0m\n"
good=0
fi
2018-07-27 11:32:20 +03:00
case $symbol in
sd_*)
((sd_good+=good))
((sd_total+=1))
;;
udev_*)
((udev_good+=good))
((udev_total+=1))
;;
*)
echo 'unknown symbol prefix'
exit 1
esac
done
2018-07-27 11:32:20 +03:00
echo "libsystemd: $sd_good/$sd_total libudev: $udev_good/$udev_total"