Over a decade ago there was some work in bsd.man.mk to build tbl pages 
with mandoc. For example this commit from 2010:

----------------------------
revision 1.32
date: 2010/10/17 22:47:08;  author: schwarze;  state: Exp;  lines: +8 -18;
Build tbl(1) pages with mandoc(1), not groff.
Xenocara build checked myself, base build also by jmc@, thanks!
"don't wait for me" deraadt@

Pages in base using tbl mostly look good already except for the
rare .T{ macros; there may still be a few formatting issues
in xenocara, please speak up when you run into them.
Eventually, mandoc will catch up.
----------------------------

Back then there was some special infrastructure to build these man pages 
if they were named something like *.6tbl.

That convention is a local OpenBSD convention, it does not exist outside 
of our tree.

At this point the special naming for these man pages is no longer needed:

* games/phantasia/phantasia.6tbl
* gnu/usr.sbin/mkhybrid/src/mkhybrid.8tbl
* share/man/man4/man4.hppa/cpu.4tbl
* share/man/man4/wi.4tbl
* share/man/man4/man4.hppa/cpu.4tbl
* usr.bin/infocmp/infocmp.1tbl
* usr.bin/tic/captoinfo.1tbl

The benefits are:
- The affected Makefiles are shortened by 3+ lines
- diffing external software like mkhybrid against the original sources 
  results in less noise
- remove an unnecessary cp step doing the build

ok on the diff below? (I've left out the man page renames from the diff 
for brevity)



Index: games/phantasia/Makefile
===================================================================
RCS file: /cvs/src/games/phantasia/Makefile,v
retrieving revision 1.18
diff -u -p -u -r1.18 Makefile
--- games/phantasia/Makefile    24 Nov 2015 03:10:10 -0000      1.18
+++ games/phantasia/Makefile    7 Jul 2022 01:24:22 -0000
@@ -6,7 +6,7 @@ CFLAGS+=-DTERMIOS
 DPADD= ${LIBM} ${LIBCURSES}
 LDADD= -lm -lcurses
 MAN=   phantasia.6
-CLEANFILES+=map setup setup.o phantglobs.o.bld phantasia.6
+CLEANFILES+=map setup setup.o phantglobs.o.bld
 
 all: setup phantasia
 
@@ -19,9 +19,6 @@ phantglobs.o.bld: phantglobs.c
 setup: phantglobs.o.bld setup.o monsters.asc ${DPADD} 
        ${HOSTCC} ${CFLAGS} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} \
                  phantglobs.o.bld setup.o ${LDADD}
-
-phantasia.6: phantasia.6tbl
-       cp ${.ALLSRC} ${.TARGET}
 
 beforeinstall: 
        ./setup -m ${.CURDIR}/monsters.asc
Index: gnu/usr.sbin/mkhybrid/mkhybrid/Makefile
===================================================================
RCS file: /cvs/src/gnu/usr.sbin/mkhybrid/mkhybrid/Makefile,v
retrieving revision 1.7
diff -u -p -u -r1.7 Makefile
--- gnu/usr.sbin/mkhybrid/mkhybrid/Makefile     9 Sep 2015 20:02:31 -0000       
1.7
+++ gnu/usr.sbin/mkhybrid/mkhybrid/Makefile     7 Jul 2022 01:24:22 -0000
@@ -8,7 +8,6 @@
 PROG=  mkhybrid
 MAN=   mkhybrid.8
 BINDIR=        /usr/sbin
-CLEANFILES+= mkhybrid.8
 .PATH: ${.CURDIR}/../src ${.CURDIR}/../src/libhfs_iso ${.CURDIR}/../src/libfile
 
 SRCS=  data.c block.c low.c lfile.c btree.c node.c record.c lvolume.c \
@@ -20,8 +19,5 @@ CFLAGS+=-DSYSTEM_ID_DEFAULT=\"OpenBSD\" 
        -I${.CURDIR}/../src -I${.CURDIR}/../src/include \
        -I${.CURDIR}/../src/libhfs_iso \
        -I${.CURDIR}/../src/libfile
-
-mkhybrid.8: mkhybrid.8tbl
-       cp ${.ALLSRC} ${.TARGET}
 
 .include <bsd.prog.mk>
Index: share/man/man4/man4.hppa/Makefile
===================================================================
RCS file: /cvs/src/share/man/man4/man4.hppa/Makefile,v
retrieving revision 1.29
diff -u -p -u -r1.29 Makefile
--- share/man/man4/man4.hppa/Makefile   30 Mar 2016 06:38:44 -0000      1.29
+++ share/man/man4/man4.hppa/Makefile   7 Jul 2022 01:24:22 -0000
@@ -6,9 +6,5 @@ MAN+=   harmony.4 ie.4 intro.4 io.4 lasi.4
 MAN+=  phantomas.4 power.4 runway.4 ssio.4 uturn.4 wax.4
 # tir.4 xbar.4 mcx.4
 MANSUBDIR=hppa
-CLEANFILES+= cpu.4
-
-cpu.4: cpu.4tbl
-       cp ${.ALLSRC} ${.TARGET}
 
 .include <bsd.prog.mk>
Index: share/man/man4/Makefile
===================================================================
RCS file: /cvs/src/share/man/man4/Makefile,v
retrieving revision 1.817
diff -u -p -u -r1.817 Makefile
--- share/man/man4/Makefile     18 Jan 2022 07:53:39 -0000      1.817
+++ share/man/man4/Makefile     7 Jul 2022 01:24:22 -0000
@@ -113,9 +113,4 @@ SUBDIR=     man4.alpha man4.amd64 man4.arm64
        man4.hppa man4.i386 man4.landisk man4.loongson man4.luna88k \
        man4.macppc man4.octeon man4.powerpc64 man4.riscv64 man4.sparc64
 
-CLEANFILES+= wi.4
-
-wi.4: wi.4tbl
-       cp ${.ALLSRC} ${.TARGET}
-
 .include <bsd.prog.mk>
Index: share/man/man4/man4.hppa/Makefile
===================================================================
RCS file: /cvs/src/share/man/man4/man4.hppa/Makefile,v
retrieving revision 1.29
diff -u -p -u -r1.29 Makefile
--- share/man/man4/man4.hppa/Makefile   30 Mar 2016 06:38:44 -0000      1.29
+++ share/man/man4/man4.hppa/Makefile   7 Jul 2022 01:24:22 -0000
@@ -6,9 +6,5 @@ MAN+=   harmony.4 ie.4 intro.4 io.4 lasi.4
 MAN+=  phantomas.4 power.4 runway.4 ssio.4 uturn.4 wax.4
 # tir.4 xbar.4 mcx.4
 MANSUBDIR=hppa
-CLEANFILES+= cpu.4
-
-cpu.4: cpu.4tbl
-       cp ${.ALLSRC} ${.TARGET}
 
 .include <bsd.prog.mk>
Index: usr.bin/infocmp/Makefile
===================================================================
RCS file: /cvs/src/usr.bin/infocmp/Makefile,v
retrieving revision 1.5
diff -u -p -u -r1.5 Makefile
--- usr.bin/infocmp/Makefile    21 Dec 2019 21:40:01 -0000      1.5
+++ usr.bin/infocmp/Makefile    7 Jul 2022 01:24:22 -0000
@@ -7,15 +7,12 @@ LDADD=        -lcurses
 CURSES= ${.CURDIR}/../../lib/libcurses
 TIC= ${.CURDIR}/../tic
 CFLAGS+= -I${CURSES} -I${TIC} -I${.CURDIR} -I.
-CLEANFILES+= termsort.c infocmp.1
+CLEANFILES+= termsort.c
 .PATH:  ${TIC}
 
 dump_entry.o: termsort.c
 
 termsort.c: ${TIC}/MKtermsort.sh
        sh ${TIC}/MKtermsort.sh awk ${CURSES}/Caps > ${.TARGET}
-
-infocmp.1: infocmp.1tbl
-       cp ${.ALLSRC} ${.TARGET}
 
 .include <bsd.prog.mk>
Index: usr.bin/tic/Makefile
===================================================================
RCS file: /cvs/src/usr.bin/tic/Makefile,v
retrieving revision 1.10
diff -u -p -u -r1.10 Makefile
--- usr.bin/tic/Makefile        21 Dec 2019 21:40:01 -0000      1.10
+++ usr.bin/tic/Makefile        7 Jul 2022 01:24:22 -0000
@@ -8,7 +8,7 @@ DPADD=  ${LIBCURSES}
 LDADD= -lcurses
 CURSES=        ${.CURDIR}/../../lib/libcurses
 CFLAGS+= -I${CURSES} -I${.CURDIR} -I.
-CLEANFILES+= termsort.c captoinfo.1
+CLEANFILES+= termsort.c
 
 # Work around gcc optimization bug on sh
 .if (${MACHINE_ARCH} == sh)
@@ -19,8 +19,5 @@ dump_entry.o: termsort.c
 
 termsort.c: MKtermsort.sh
        sh ${.CURDIR}/MKtermsort.sh awk ${CURSES}/Caps > ${.TARGET}
-
-captoinfo.1: captoinfo.1tbl
-       cp ${.ALLSRC} ${.TARGET}
 
 .include <bsd.prog.mk>

Reply via email to