Module Name:    src
Committed By:   apb
Date:           Fri Oct 25 22:16:29 UTC 2013

Modified Files:
        src/share/mk: bsd.man.mk

Log Message:
Rename _MNUMBERS to _MSECTIONS.  The manual section identifiers
are not just numbers any more.

Also introduce a new variable, _MSECTIONREGEX, as a regular expression
to match any of the elements of ${_MSECTIONS}.  Use this instead of
\.[1-9][a-z]*.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/share/mk/bsd.man.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.man.mk
diff -u src/share/mk/bsd.man.mk:1.113 src/share/mk/bsd.man.mk:1.114
--- src/share/mk/bsd.man.mk:1.113	Fri Oct 25 10:45:01 2013
+++ src/share/mk/bsd.man.mk	Fri Oct 25 22:16:29 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.man.mk,v 1.113 2013/10/25 10:45:01 apb Exp $
+#	$NetBSD: bsd.man.mk,v 1.114 2013/10/25 22:16:29 apb Exp $
 #	@(#)bsd.man.mk	8.1 (Berkeley) 6/8/93
 
 .include <bsd.init.mk>
@@ -31,9 +31,10 @@ MANTARGET?=	cat
 
 MAN?=
 MLINKS?=
-_MNUMBERS=	1 2 3 4 5 6 7 8 9
-_MNUMBERS+=	3lua 9lua
-.SUFFIXES:	${_MNUMBERS:@N@.$N@}
+_MSECTIONS=	1 2 3 4 5 6 7 8 9
+_MSECTIONS+=	3lua 9lua
+_MSECTIONREGEX=	${_MSECTIONS:ts|} # e.g. 1|2|3|...
+.SUFFIXES:	${_MSECTIONS:@N@.$N@}
 
 .if ${MKMANZ} == "no"
 MANCOMPRESS?=
@@ -74,9 +75,9 @@ MANPAGES=	${MAN:C/.$/&${MANSUFFIX}/}
 realall:	${MANPAGES}
 .if !empty(MANSUFFIX)
 .NOPATH:	${MANPAGES}
-.SUFFIXES:	${_MNUMBERS:@N@.$N${MANSUFFIX}@}
+.SUFFIXES:	${_MSECTIONS:@N@.$N${MANSUFFIX}@}
 
-${_MNUMBERS:@N@.$N.$N${MANSUFFIX}@}:			# build rule
+${_MSECTIONS:@N@.$N.$N${MANSUFFIX}@}:			# build rule
 	${_MKTARGET_FORMAT}
 	cat ${.IMPSRC} ${MANCOMPRESS} > ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET}
 .endif # !empty(MANSUFFIX)
@@ -124,14 +125,14 @@ manlinks::	${_t}
 .if (${MKCATPAGES} != "no") && (${MKMAN} != "no")
 catinstall:	catpages catlinks
 catpages::	# ensure target exists
-CATPAGES=	${MAN:C/\.([1-9][a-z]*)$/.cat\1${MANSUFFIX}/}
+CATPAGES=	${MAN:C/\.(${_MSECTIONREGEX})\$/.cat\1${MANSUFFIX}/}
 
 realall:	${CATPAGES}
 .NOPATH:	${CATPAGES}
-.SUFFIXES:	${_MNUMBERS:@N@.cat$N${MANSUFFIX}@}
+.SUFFIXES:	${_MSECTIONS:@N@.cat$N${MANSUFFIX}@}
 .MADE:	${CATDEPS}
 
-${_MNUMBERS:@N@.$N.cat$N${MANSUFFIX}@}: ${CATDEPS}	# build rule
+${_MSECTIONS:@N@.$N.cat$N${MANSUFFIX}@}: ${CATDEPS}	# build rule
 	${_MKTARGET_FORMAT}
 .if ${MKMANDOC} == yes && !defined(NOMANDOC)
 	if test ""${NOMANDOC.${.IMPSRC:T}:tl:Q} != "yes"; then \
@@ -192,16 +193,16 @@ catlinks::	${_t}
 .if (${MKHTML} != "no") && (${MKMAN} != "no")		# {
 htmlinstall:	htmlpages htmllinks
 htmlpages::	# ensure target exists
-HTMLPAGES=	${MAN:C/\.([1-9][a-z]*)$/.html\1/}
+HTMLPAGES=	${MAN:C/\.(${_MSECTIONREGEX})\$/.html\1/}
 
 HTMLLINKS=	${MANSUBDIR:?../:}../html%S/%N.html
 HTMLSTYLE=	${MANSUBDIR:?../:}../style.css
 
 realall:	${HTMLPAGES}
 .NOPATH:	${HTMLPAGES}
-.SUFFIXES:	${_MNUMBERS:@N@.html$N@}
+.SUFFIXES:	${_MSECTIONS:@N@.html$N@}
 
-${_MNUMBERS:@N@.$N.html$N@}: 				# build rule
+${_MSECTIONS:@N@.$N.html$N@}: 				# build rule
 	${_MKTARGET_FORMAT}
 .if ${MKMANDOC} == yes && !defined(NOMANDOC)
 	if test ""${NOMANDOC.${.IMPSRC:T}:tl:Q} != "yes"; then \

Reply via email to