aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2014-11-21 14:54:11 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2014-11-21 14:54:11 +0000
commitf83444a8405014b208df0c02f01687c4d545242b (patch)
tree88c94b6eda7da19707b709523902c7841c927dcb
parentf6fe7fdccf1b0299a8787bb6cd682c1809b1decc (diff)
downloadports-f83444a8405014b208df0c02f01687c4d545242b.tar.gz
ports-f83444a8405014b208df0c02f01687c4d545242b.zip
Notes
-rw-r--r--Mk/bsd.port.mk18
1 files changed, 18 insertions, 0 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 84d38c2fb0a1..113131ef089b 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -5221,6 +5221,24 @@ install-rc-script:
.endif
.endif
+.if !target(check-man)
+check-man: stage
+ @${ECHO_MSG} "====> Checking man pages (check-man)"
+ @mdirs= ; \
+ for dir in ${MANDIRS:S/^/${STAGEDIR}/} ; do \
+ [ -d $$dir ] && mdirs="$$mdirs $$dir" ;\
+ done ; \
+ err=0 ; \
+ for dir in $$mdirs; do \
+ for f in $$(find $$dir -name "*.gz"); do \
+ ${ECHO_CMD} "===> Checking $${f##*/}" ; \
+ gunzip -c $$f | mandoc -Tlint -Werror || zgrep -q "^.so" $$f && continue ; \
+ err=1 ; \
+ done ; \
+ done ; \
+ exit $$err
+.endif
+
# Compress all manpage not already compressed which are not hardlinks
# Find all manpages which are not compressed and are hadlinks, and only get the list of inodes concerned, for each of them compress the first one found and recreate the hardlinks for the others
# Fixes all dead symlinks left by the previous round