diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1996-10-01 09:02:46 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1996-10-01 09:02:46 +0000 |
commit | 4e36987f40a32e35dc5dab678191e0fd4aa39027 (patch) | |
tree | 9bff4fee67aa0692d3339ca7b5ddf2f7a7ce6b3a | |
parent | 1731875ac5a169f255f0fce09e00d136ab9c1174 (diff) |
Automagically support building man pages with tbl(1).
foo.1 becomes foo.1tbl
-rw-r--r-- | share/mk/bsd.man.mk | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk index db0ed8158a6..826615bfba0 100644 --- a/share/mk/bsd.man.mk +++ b/share/mk/bsd.man.mk @@ -1,9 +1,10 @@ -# $OpenBSD: bsd.man.mk,v 1.12 1996/08/19 09:24:25 downsj Exp $ +# $OpenBSD: bsd.man.mk,v 1.13 1996/10/01 09:02:45 downsj Exp $ # $NetBSD: bsd.man.mk,v 1.23 1996/02/10 07:49:33 jtc Exp $ # @(#)bsd.man.mk 5.2 (Berkeley) 5/11/90 MANTARGET?= cat NROFF?= nroff +TBL?= tbl .if !target(.MAIN) .if exists(${.CURDIR}/../Makefile.inc) @@ -13,15 +14,20 @@ NROFF?= nroff .MAIN: all .endif -.SUFFIXES: .1 .2 .3 .4 .5 .6 .7 .8 .9 .cat1 .cat2 .cat3 .cat4 .cat5 .cat6 \ - .cat7 .cat8 .cat9 +.SUFFIXES: .1 .2 .3 .4 .5 .6 .7 .8 .9 .1tbl .2tbl .3tbl .4tbl .5tbl .6tbl \ + .7tbl .8tbl .9tbl .cat1 .cat2 .cat3 .cat4 .cat5 .cat6 .cat7 .cat8 .cat9 .9.cat9 .8.cat8 .7.cat7 .6.cat6 .5.cat5 .4.cat4 .3.cat3 .2.cat2 .1.cat1: @echo "${NROFF} -mandoc ${.IMPSRC} > ${.TARGET}" @${NROFF} -mandoc ${.IMPSRC} > ${.TARGET} || (rm -f ${.TARGET}; false) +.9tbl.cat9 .8tbl.cat8 .7tbl.cat7 .6tbl.cat6 .5tbl.cat5 .4tbl.cat4 .3tbl.cat3 \ +.2tbl.cat2 .1tbl.cat1: + @echo "${TBL} ${.IMPSRC} | ${NROFF} -mandoc > ${.TARGET}" + @${TBL} ${.IMPSRC} | ${NROFF} -mandoc > ${.TARGET} || (rm -f ${.TARGET}; false) + .if defined(MAN) && !empty(MAN) && !defined(MANALL) -MANALL= ${MAN:S/.1$/.cat1/g:S/.2$/.cat2/g:S/.3$/.cat3/g:S/.4$/.cat4/g:S/.5$/.cat5/g:S/.6$/.cat6/g:S/.7$/.cat7/g:S/.8$/.cat8/g:S/.9$/.cat9/g} +MANALL= ${MAN:S/.1$/.cat1/g:S/.2$/.cat2/g:S/.3$/.cat3/g:S/.4$/.cat4/g:S/.5$/.cat5/g:S/.6$/.cat6/g:S/.7$/.cat7/g:S/.8$/.cat8/g:S/.9$/.cat9/g:S/.1tbl$/.cat1/g:S/.2tbl$/.cat2/g:S/.3tbl$/.cat3/g:S/.4tbl$/.cat4/g:S/.5tbl$/.cat5/g:S/.6tbl$/.cat6/g:S/.7tbl$/.cat7/g:S/.8tbl$/.cat8/g:S/.9tbl$/.cat9/g} .endif MINSTALL= install ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} |