summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-09-09 21:41:40 +0200
committerThomas Haller <thaller@redhat.com>2018-09-14 09:04:23 +0200
commita124dba6fe997ee17aeed003de7a0764f7283609 (patch)
tree420eef9fd3c9590b21b650ad36e65a1f4145bf96 /docs
parent6bd5415fbbcf2adda7853db0f9e8f1cbb990f0fc (diff)
docs/test: add check that gtk-doc contains patch to generate proper documentation
In libnm, we prefer opaque typedefs. gtk-doc needs to be patched to properly generate documentation. Add a check for that. Add a test. By default, this does not fail but just prints a warning. The test can be made failing by setting NMTST_CHECK_GTK_DOC=1. See-also: https://gitlab.gnome.org/GNOME/gtk-doc/merge_requests/2 (cherry picked from commit 02464c052e2f8a1e88b012e0a29f5f66fce310ad)
Diffstat (limited to 'docs')
-rw-r--r--docs/libnm/Makefile.am12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/libnm/Makefile.am b/docs/libnm/Makefile.am
index c5f2b836b..7aa9810e8 100644
--- a/docs/libnm/Makefile.am
+++ b/docs/libnm/Makefile.am
@@ -1,6 +1,8 @@
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = 1.6
+check_local =
+
# The name of the module
DOC_MODULE=libnm
@@ -94,3 +96,13 @@ CLEANFILES += \
tmpl/* \
xml/*
+if GTK_DOC_BUILD_HTML
+check-local-gtk-doc-patch:
+ @if grep -q -F '<a href="libnm-nm-setting-user.html">nm-setting-user</a>' "$(top_builddir)/docs/libnm/html/index.html"; then \
+ echo "WARNING: The generated documentation has issues. Patch your gtk-doc (see https://gitlab.gnome.org/GNOME/gtk-doc/merge_requests/2). Let this check fail with NMTST_CHECK_GTK_DOC=1"; \
+ test "$$NMTST_CHECK_GTK_DOC" != 1; \
+ fi
+check_local += check-local-gtk-doc-patch
+endif
+
+check-local: $(check_local)