Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Nov 2014 14:54:12 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r372997 - head/Mk
Message-ID:  <201411211454.sALEsCVn018561@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411211454.sALEsCVn018561>