Add MKMANDOC option to trigger building cat pages and HTML pages with
mdocml. Add a lintmanpages target for developers to check man pages with the strictest settings of mandoc.
This commit is contained in:
parent
af76846cf3
commit
3b68c94681
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: bsd.README,v 1.255 2009/10/10 19:05:29 apb Exp $
|
||||
# $NetBSD: bsd.README,v 1.256 2009/10/23 22:14:37 joerg Exp $
|
||||
# @(#)bsd.README 8.2 (Berkeley) 4/2/94
|
||||
|
||||
This is the README file for the make "include" files for the NetBSD
|
||||
|
@ -238,6 +238,12 @@ MKMAN If "no", don't build or install the man or catman pages,
|
|||
and also acts as "MKCATPAGES=no MKHTML=no".
|
||||
Default: yes
|
||||
|
||||
MKMANDOC If "yes", mandoc is built as tool and used to compile
|
||||
catman or html pages. A directory can be exempted by
|
||||
defining NOMANDOC. Individual man pages are exempted
|
||||
if USETBL is set or NOMANDOC.${target} is set to "yes".
|
||||
Default: no
|
||||
|
||||
MKMANZ If not "no", compress manual pages at installation time.
|
||||
Default: no
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: bsd.man.mk,v 1.100 2009/04/10 16:16:12 apb Exp $
|
||||
# $NetBSD: bsd.man.mk,v 1.101 2009/10/23 22:14:37 joerg Exp $
|
||||
# @(#)bsd.man.mk 8.1 (Berkeley) 6/8/93
|
||||
|
||||
.include <bsd.init.mk>
|
||||
|
@ -6,6 +6,9 @@
|
|||
##### Basic targets
|
||||
.PHONY: catinstall maninstall catpages manpages catlinks manlinks
|
||||
.PHONY: htmlinstall htmlpages htmllinks
|
||||
.if ${MKMANDOC} == "yes"
|
||||
.PHONY: lintmanpages
|
||||
.endif
|
||||
realinstall: ${MANINSTALL}
|
||||
|
||||
##### Default values
|
||||
|
@ -131,6 +134,14 @@ ${_MNUMBERS:@N@.$N.cat$N${MANSUFFIX}@}: ${CATDEPS} # build rule
|
|||
.if defined(USETBL)
|
||||
${TOOL_TBL} ${.IMPSRC} | ${TOOL_ROFF_ASCII} -mandoc ${MANCOMPRESS} \
|
||||
> ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET}
|
||||
.elif ${MKMANDOC} == yes && !defined(NOMANDOC)
|
||||
if test ""${NOMANDOC.${.IMPSRC:T}:tl:Q} != "yes"; then \
|
||||
${TOOL_MANDOC_ASCII} ${.IMPSRC} ${MANCOMPRESS} \
|
||||
> ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET}; \
|
||||
else \
|
||||
${TOOL_ROFF_ASCII} -mandoc ${.IMPSRC} ${MANCOMPRESS} \
|
||||
> ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET}; \
|
||||
fi
|
||||
.else
|
||||
${TOOL_ROFF_ASCII} -mandoc ${.IMPSRC} ${MANCOMPRESS} \
|
||||
> ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET}
|
||||
|
@ -188,8 +199,18 @@ realall: ${HTMLPAGES}
|
|||
|
||||
${_MNUMBERS:@N@.$N.html$N@}: ${HTMLDEPS} # build rule
|
||||
${_MKTARGET_FORMAT}
|
||||
.if ${MKMANDOC} == "yes" && !defined(NOMANDOC)
|
||||
if test ""${NOMANDOC.${.IMPSRC:T}:tl:Q} != "yes"; then \
|
||||
${TOOL_MANDOC_HTML} ${.IMPSRC} > ${.TARGET}.tmp && \
|
||||
mv ${.TARGET}.tmp ${.TARGET}; \
|
||||
else \
|
||||
${TOOL_ROFF_HTML} ${.IMPSRC} > ${.TARGET}.tmp && \
|
||||
mv ${.TARGET}.tmp ${.TARGET}; \
|
||||
fi
|
||||
.else
|
||||
${TOOL_ROFF_HTML} ${.IMPSRC} > ${.TARGET}.tmp && \
|
||||
mv ${.TARGET}.tmp ${.TARGET}
|
||||
.endif
|
||||
|
||||
.for F in ${HTMLPAGES:O:u}
|
||||
# construct installed path
|
||||
|
@ -253,6 +274,11 @@ cleanman: .PHONY
|
|||
.endif
|
||||
# (XXX ${CATPAGES:S...} cleans up old .catN files where .catN.gz now used)
|
||||
|
||||
.if ${MKMANDOC} == "yes"
|
||||
lintmanpages: ${MANPAGES}
|
||||
${TOOL_MANDOC_LINT} -Tlint -fstrict ${.ALLSRC}
|
||||
.endif
|
||||
|
||||
##### Pull in related .mk logic
|
||||
.include <bsd.obj.mk>
|
||||
.include <bsd.files.mk>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: bsd.own.mk,v 1.589 2009/10/22 21:55:34 skrll Exp $
|
||||
# $NetBSD: bsd.own.mk,v 1.590 2009/10/23 22:14:37 joerg Exp $
|
||||
|
||||
.if !defined(_BSD_OWN_MK_)
|
||||
_BSD_OWN_MK_=1
|
||||
|
@ -706,7 +706,7 @@ ${var}?= yes
|
|||
.for var in \
|
||||
MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKDEBUG MKDEBUGLIB \
|
||||
MKLVM \
|
||||
MKMANZ MKOBJDIRS \
|
||||
MKMANDOC MKMANZ MKOBJDIRS \
|
||||
MKPCC MKPCCCMDS \
|
||||
MKSOFTFLOAT MKSTRIPIDENT \
|
||||
MKUNPRIVED MKUPDATE MKX11
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.127 2009/02/25 22:28:36 sketch Exp $
|
||||
# $NetBSD: Makefile,v 1.128 2009/10/23 22:14:37 joerg Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
|
@ -55,6 +55,9 @@ SUBDIR= host-mkdep .WAIT compat .WAIT \
|
|||
|
||||
.if ${MKMAN} != "no" || ${MKDOC} != "no" || ${MKHTML} != "no"
|
||||
SUBDIR+= groff
|
||||
. if ${MKMANDOC} == "yes"
|
||||
SUBDIR+= mandoc
|
||||
. endif
|
||||
.endif
|
||||
|
||||
.if ${MKMAINTAINERTOOLS:Uno} != "no"
|
||||
|
|
Loading…
Reference in New Issue