aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2015-03-18 23:21:46 +0100
committerDan Fandrich <dan@coneharvesters.com>2015-03-18 23:44:45 +0100
commit431c5261d2f512e87d6ee6f2a0701592ee29fcdf (patch)
tree5be8e5a8ba09061978fec0c5c9587512863d958a /docs
parentd260a0aeeb62ce1484ac713900a72da32e25b3d3 (diff)
docs/libcurl: check that all options with man pages are referenced
If a man page exists in the opts/ directory, it must also be referenced either in curl_easy_setopt.3 or curl_multi_setopt.3
Diffstat (limited to 'docs')
-rw-r--r--docs/libcurl/Makefile.am16
1 files changed, 15 insertions, 1 deletions
diff --git a/docs/libcurl/Makefile.am b/docs/libcurl/Makefile.am
index d208bf6b2..d6543d280 100644
--- a/docs/libcurl/Makefile.am
+++ b/docs/libcurl/Makefile.am
@@ -85,7 +85,7 @@ PDFPAGES = curl_easy_cleanup.pdf curl_easy_getinfo.pdf \
m4macrodir = $(datadir)/aclocal
dist_m4macro_DATA = libcurl.m4
-CLEANFILES = $(HTMLPAGES) $(PDFPAGES)
+CLEANFILES = $(HTMLPAGES) $(PDFPAGES) $(TESTS)
EXTRA_DIST = $(man_MANS) $(HTMLPAGES) index.html $(PDFPAGES) ABI \
symbols-in-versions symbols.pl mksymbolsmanpage.pl
@@ -111,3 +111,17 @@ pdf: $(PDFPAGES)
ps2pdf $$foo.ps $@; \
rm $$foo.ps; \
echo "converted $< to $@")
+
+# Make sure each option man page is referenced in the main man page
+TESTS = check-easy check-multi
+LOG_COMPILER = $(PERL)
+# The test fails if the log file contains any text
+AM_LOG_FLAGS = -p -e 'die "$$_" if ($$_);'
+
+check-easy: $(srcdir)/curl_easy_setopt.3 $(srcdir)/opts/CURLOPT*.3
+ OPTS="$$(ls $(srcdir)/opts/CURLOPT*.3 | $(SED) -e 's,^.*/,,' -e 's,\.3$$,,')" && \
+ for opt in $$OPTS; do grep "^\.IP $$opt$$" $(srcdir)/curl_easy_setopt.3 >/dev/null || echo Missing $$opt; done > $@
+
+check-multi: $(srcdir)/curl_multi_setopt.3 $(srcdir)/opts/CURLMOPT*.3
+ OPTS="$$(ls $(srcdir)/opts/CURLMOPT*.3 | $(SED) -e 's,^.*/,,' -e 's,\.3$$,,')" && \
+ for opt in $$OPTS; do grep "^\.IP $$opt$$" $(srcdir)/curl_multi_setopt.3 >/dev/null || echo Missing $$opt; done > $@