]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - man/Makefile
Makefile: check manpages for syntax errors
[mirror_iproute2.git] / man / Makefile
index 6b095ee4664746c92e5ac86eb82e2f024fe522bd..0c759dd2f950eff293fcc67896d6c975911f080a 100644 (file)
@@ -2,14 +2,19 @@
 INSTALL=install
 INSTALLDIR=install -m 0755 -d
 INSTALLMAN=install -m 0644
+# Pass the same parameters as Lintian uses on Debian.
+MAN_CHECK=LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 man --warnings \
+       --encoding=UTF-8 --local-file --troff-device=utf8 --ditroff
+# Hide man output, count and print errors.
+MAN_REDIRECT=2>&1 >/dev/null | tee /dev/fd/2 | wc -l
 
 SUBDIRS = man3 man7 man8
 
-all clean install:
+all clean install check:
        @for subdir in $(SUBDIRS); do $(MAKE) -C $$subdir $@ || exit $$?; done
 
 distclean: clean
 
-.PHONY: install clean distclean
+.PHONY: install clean distclean check
 
 .EXPORT_ALL_VARIABLES: