meson_options.txt \
testsuite/meson.build \
scripts/build-scdoc.sh \
+ scripts/check-gtkdoc.sh \
scripts/kmod-symlink.sh
AM_CPPFLAGS = \
configuration: cdata,
)
-gnome.gtkdoc(
+built_docs = gnome.gtkdoc(
'libkmod',
content_files : version_file,
ignore_headers : [
module_version : '3',
main_xml : 'libkmod-docs.xml',
)
+
+test(
+ 'test-gtkdoc',
+ check_gtkdoc,
+ args : meson.current_build_dir(),
+ depends : built_docs,
+)
endif
if get_option('docs')
+ check_gtkdoc = find_program('scripts/check-gtkdoc.sh')
subdir('libkmod/docs')
endif
--- /dev/null
+#!/bin/bash
+
+set -euo pipefail
+
+err=0
+
+warn() {
+ (( ++err ))
+ echo
+ echo "WARNING: $1."
+ echo "See file below for more details."
+ echo
+ echo "$2:"
+ cat "$2"
+ echo
+}
+
+cd "$1"
+
+grep -q '100%' 'libkmod-undocumented.txt' || warn 'Some APIs are missing documentation' 'libkmod-undocumented.txt'
+
+(( $(wc -l < 'libkmod-unused.txt') == 0)) || warn 'APIs are missing from the libkmod-section.txt index' 'libkmod-unused.txt'
+
+exit "$err"