diff options
author | ru <ru@FreeBSD.org> | 2001-09-05 11:24:34 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2001-09-05 11:24:34 +0000 |
commit | 46bc9d1a6454f5d993df6ed6e074d29517155f6d (patch) | |
tree | 3b7d3a552da1c79d55db90e9a632cf5a0af1c5c3 | |
parent | a6e413429a256d50629129a18d620da27917cfb6 (diff) | |
download | FreeBSD-src-46bc9d1a6454f5d993df6ed6e074d29517155f6d.zip FreeBSD-src-46bc9d1a6454f5d993df6ed6e074d29517155f6d.tar.gz |
Implement the `manlint' target, for minimal validity checking of
the manual pages. Mostly useful with mdoc(7) formatted manuals.
Requested by: murray
-rw-r--r-- | share/mk/bsd.README | 8 | ||||
-rw-r--r-- | 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 <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: 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 |