Add a new check-man target that will check the manpages inside the port for

correctness against mandoc lint checker
This commit is contained in:
Baptiste Daroussin 2014-11-21 14:54:11 +00:00
parent f6fe7fdccf
commit f83444a840
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=372997

View file

@ -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