aboutsummaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-08-24 10:45:32 -0700
committerBen Pfaff <blp@nicira.com>2011-08-24 12:42:52 -0700
commit0027492deeae5ed1c51458ae1970064be2089df9 (patch)
treebb192451c4a6fc5288b7681b064045d1aae52eb3 /Makefile.am
parent5d943800c1681d572411f9883e45dfb9a9e33909 (diff)
docs: Add Makefile rule to check syntax of manpages.
This should catch future nroff syntax errors immediately, instead of much later.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am15
1 files changed, 14 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 91218e14..2090501c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -45,7 +45,8 @@ EXTRA_DIST = \
REPORTING-BUGS \
SubmittingPatches \
WHY-OVS \
- boot.sh
+ boot.sh \
+ $(MAN_FRAGMENTS)
bin_PROGRAMS =
sbin_PROGRAMS =
bin_SCRIPTS =
@@ -57,6 +58,7 @@ dist_sbin_SCRIPTS =
dist_scripts_SCRIPTS =
INSTALL_DATA_LOCAL =
man_MANS =
+MAN_FRAGMENTS =
noinst_DATA =
noinst_HEADERS =
noinst_LIBRARIES =
@@ -148,6 +150,17 @@ rate-limit-check:
exit 1; \
fi
+if HAVE_GROFF
+ALL_LOCAL += manpage-check
+manpage-check: $(MANS) $(MAN_FRAGMENTS)
+ @manpages=; \
+ for d in $(MANS); do \
+ manpages="$$manpages `test -f $$d || echo $(VPATH)/`$$d"; \
+ done; \
+ LANG=en_US.UTF-8 groff -w mac -w delim -w escape -w input -w missing -w tab -T utf8 -man -p -z $$manpages && touch $@
+CLEANFILES += manpage-check
+endif
+
dist-hook: $(DIST_HOOKS)
all-local: $(ALL_LOCAL)
clean-local: $(CLEAN_LOCAL)