svn commit: r372997 - head/Mk

Baptiste Daroussin bapt at FreeBSD.org
Fri Nov 21 14:54:12 UTC 2014


Author: bapt
Date: Fri Nov 21 14:54:11 2014
New Revision: 372997
URL: https://svnweb.freebsd.org/changeset/ports/372997
QAT: https://qat.redports.org/buildarchive/r372997/

Log:
  Add a new check-man target that will check the manpages inside the port for
  correctness against mandoc lint checker

Modified:
  head/Mk/bsd.port.mk

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Fri Nov 21 14:40:40 2014	(r372996)
+++ head/Mk/bsd.port.mk	Fri Nov 21 14:54:11 2014	(r372997)
@@ -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


More information about the svn-ports-all mailing list