Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Add MKMANDOC option to trigger building cat pages and HTML p...
details: https://anonhg.NetBSD.org/src/rev/a47ef321f948
branches: trunk
changeset: 748428:a47ef321f948
user: joerg <joerg%NetBSD.org@localhost>
date: Fri Oct 23 22:14:37 2009 +0000
description:
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.
diffstat:
share/mk/bsd.README | 8 +++++++-
share/mk/bsd.man.mk | 28 +++++++++++++++++++++++++++-
share/mk/bsd.own.mk | 4 ++--
tools/Makefile | 5 ++++-
4 files changed, 40 insertions(+), 5 deletions(-)
diffs (124 lines):
diff -r e18452eec49f -r a47ef321f948 share/mk/bsd.README
--- a/share/mk/bsd.README Fri Oct 23 20:41:11 2009 +0000
+++ b/share/mk/bsd.README Fri Oct 23 22:14:37 2009 +0000
@@ -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 @@
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
diff -r e18452eec49f -r a47ef321f948 share/mk/bsd.man.mk
--- a/share/mk/bsd.man.mk Fri Oct 23 20:41:11 2009 +0000
+++ b/share/mk/bsd.man.mk Fri Oct 23 22:14:37 2009 +0000
@@ -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 @@
.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 @@
${_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 @@
.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>
diff -r e18452eec49f -r a47ef321f948 share/mk/bsd.own.mk
--- a/share/mk/bsd.own.mk Fri Oct 23 20:41:11 2009 +0000
+++ b/share/mk/bsd.own.mk Fri Oct 23 22:14:37 2009 +0000
@@ -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 @@
.for var in \
MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKDEBUG MKDEBUGLIB \
MKLVM \
- MKMANZ MKOBJDIRS \
+ MKMANDOC MKMANZ MKOBJDIRS \
MKPCC MKPCCCMDS \
MKSOFTFLOAT MKSTRIPIDENT \
MKUNPRIVED MKUPDATE MKX11
diff -r e18452eec49f -r a47ef321f948 tools/Makefile
--- a/tools/Makefile Fri Oct 23 20:41:11 2009 +0000
+++ b/tools/Makefile Fri Oct 23 22:14:37 2009 +0000
@@ -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 @@
.if ${MKMAN} != "no" || ${MKDOC} != "no" || ${MKHTML} != "no"
SUBDIR+= groff
+. if ${MKMANDOC} == "yes"
+SUBDIR+= mandoc
+. endif
.endif
.if ${MKMAINTAINERTOOLS:Uno} != "no"
Home |
Main Index |
Thread Index |
Old Index