From 46bc9d1a6454f5d993df6ed6e074d29517155f6d Mon Sep 17 00:00:00 2001 From: ru Date: Wed, 5 Sep 2001 11:24:34 +0000 Subject: Implement the `manlint' target, for minimal validity checking of the manual pages. Mostly useful with mdoc(7) formatted manuals. Requested by: murray --- share/mk/bsd.README | 8 ++++++-- share/mk/bsd.man.mk | 13 +++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.README b/share/mk/bsd.README index ce340d3..031d470 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -90,10 +90,14 @@ environment or otherwise. You probably don't want to touch this file. The include file 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: diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk index 7695d72..8911aa4 100644 --- a/share/mk/bsd.man.mk +++ b/share/mk/bsd.man.mk @@ -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 -- cgit v1.1