summaryrefslogtreecommitdiffstats
path: root/tools/check-api-docs.sh
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-05-07 13:54:10 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-05-07 13:57:48 +0200
commitdd1e33c8dc30c4d30e65688dabff7c66a456675e (patch)
treea9ada23b8bd1fe2043671efab3e2d13700c03627 /tools/check-api-docs.sh
parentman: suffix pam options with "=" where arg is required too (diff)
downloadsystemd-dd1e33c8dc30c4d30e65688dabff7c66a456675e.tar.xz
systemd-dd1e33c8dc30c4d30e65688dabff7c66a456675e.zip
meson: drop "meson-" prefix from various helper script filenames
In a few cases, the prefix was originally necessary because a different helper script was used for automake, and a different one for meson. But now we use meson exclusively, and the prefix isn't useful. This also synchronizes the target name, file name, and variable name in meson.build. The targets exposed by meson didn't have the prefix, so the user interface is unchanged. (The prefix is retained in the few tools that are used for meson itself, e.g. meosn-vcs-tag.sh, meson-make-symlink.sh, etc.)
Diffstat (limited to 'tools/check-api-docs.sh')
-rwxr-xr-xtools/check-api-docs.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/tools/check-api-docs.sh b/tools/check-api-docs.sh
new file mode 100755
index 0000000000..1094101e08
--- /dev/null
+++ b/tools/check-api-docs.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+set -eu
+
+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
+ -e sd_seat_can_multi_session
+ -e sd_journal_open_container
+"
+
+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
+
+ 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
+
+echo "libsystemd: $sd_good/$sd_total libudev: $udev_good/$udev_total"