Implement the `manlint' target, for minimal validity checking of

the manual pages.  Mostly useful with mdoc(7) formatted manuals.

Requested by:	murray
This commit is contained in:
Ruslan Ermilov 2001-09-05 11:24:34 +00:00
parent 41611418dd
commit 59e44d720d
2 changed files with 19 additions and 2 deletions

View File

@ -90,10 +90,14 @@ environment or otherwise. You probably don't want to touch this file.
The include file <bsd.man.mk> handles installing manual pages and their
links.
It has a single target:
It has three targets:
all-man:
build manual pages.
maninstall:
Install the manual pages and their links.
install the manual pages and their links.
manlint:
verify the validity of manual pages.
It sets/uses the following variables:

View File

@ -227,3 +227,16 @@ maninstall:: ${MAN}
done
.endif
.endif
manlint:
.if defined(MAN) && !empty(MAN)
.for page in ${MAN}
manlint: ${page}lint
${page}lint: ${page}
.if defined(MANFILTER)
${MANFILTER} < ${.ALLSRC} | ${MROFF_CMD} -ww >/dev/null
.else
${MROFF_CMD} -ww ${.ALLSRC} >/dev/null
.endif
.endfor
.endif