[collectd] [PATCH 2/2] src/Makefile.am: Check for POD errors in the generated manpages.

Sebastian Harl sh at tokkee.org
Sat Aug 16 19:37:16 CEST 2008


If any of the generated manpages includes the string '\<POD ERRORS\>' the
build aborts with an error message. If pod2man finds any errors it adds a
section with that name to the output.

Signed-off-by: Sebastian Harl <sh at tokkee.org>
---
 src/Makefile.am |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 3c5c87b..5845a12 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -785,10 +785,20 @@ EXTRA_DIST += collectd-email.pod collectd-exec.pod collectd-nagios.pod \
 	postgresql_default.conf
 
 .pod.1:
-	pod2man --release=$(VERSION) --center=$(PACKAGE) $< >.pod2man.tmp 2>/dev/null && mv -f .pod2man.tmp $@ || true
+	pod2man --release=$(VERSION) --center=$(PACKAGE) $< \
+		>.pod2man.tmp 2>/dev/null && mv -f .pod2man.tmp $@ || true
+	if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
+	then \
+		echo "$@ has some POD errors!"; false; \
+	fi
 
 .pod.5:
-	pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< >.pod2man.tmp 2>/dev/null && mv -f .pod2man.tmp $@ || true
+	pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< \
+		>.pod2man.tmp 2>/dev/null && mv -f .pod2man.tmp $@ || true
+	if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
+	then \
+		echo "$@ has some POD errors!"; false; \
+	fi
 
 install-exec-hook:
 	$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
-- 
1.6.0.rc2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080816/9d1980fb/attachment.pgp 


More information about the collectd mailing list