summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2002-10-29 14:56:09 +0000
committerru <ru@FreeBSD.org>2002-10-29 14:56:09 +0000
commit11834b7f231b0729a11f59925ace7a1bfe468b9c (patch)
treea705353b040f762a1e29b454e0f34c5802e4a62a /share
parent88d6ca0efa29af6bbdbff6210f18fb12b918d2c4 (diff)
downloadFreeBSD-src-11834b7f231b0729a11f59925ace7a1bfe468b9c.zip
FreeBSD-src-11834b7f231b0729a11f59925ace7a1bfe468b9c.tar.gz
bsd.doc.mk changes:
Don't gratuitously pipe thru a cat(1) if NODOCCOMPRESS. Only create _stamp.extra when necessary. Get rid of SOELIMPP and OBJS. Use Groff version of soelim(1); we need its -I option for the following to work. Don't needlessly chdir to SRCDIR. Only a few documents need CD_HACK, and those that need it either use refer(1) or .PSPIC macro which internally uses the .psbb call.
Diffstat (limited to 'share')
-rw-r--r--share/doc/papers/bufbio/Makefile11
-rw-r--r--share/doc/papers/jail/Makefile13
-rw-r--r--share/doc/papers/kernmalloc/Makefile26
-rw-r--r--share/doc/papers/px/Makefile23
-rw-r--r--share/doc/papers/relengr/Makefile14
-rw-r--r--share/doc/papers/sysperf/Makefile16
-rw-r--r--share/doc/psd/01.cacm/Makefile14
-rw-r--r--share/doc/psd/02.implement/Makefile16
-rw-r--r--share/doc/psd/12.make/Makefile2
-rw-r--r--share/doc/psd/15.yacc/Makefile12
-rw-r--r--share/doc/psd/22.rpcgen/Makefile11
-rw-r--r--share/doc/psd/23.rpc/Makefile13
-rw-r--r--share/doc/psd/24.xdr/Makefile11
-rw-r--r--share/doc/psd/25.xdrrfc/Makefile11
-rw-r--r--share/doc/psd/26.rpcrfc/Makefile11
-rw-r--r--share/doc/psd/27.nfsrpc/Makefile11
-rw-r--r--share/doc/usd/13.viref/Makefile26
-rw-r--r--share/doc/usd/19.memacros/Makefile15
-rw-r--r--share/doc/usd/20.meref/Makefile15
-rw-r--r--share/doc/usd/21.troff/Makefile8
-rw-r--r--share/doc/usd/22.trofftut/Makefile1
-rw-r--r--share/mk/bsd.doc.mk62
22 files changed, 163 insertions, 179 deletions
diff --git a/share/doc/papers/bufbio/Makefile b/share/doc/papers/bufbio/Makefile
index 507ad84..fa1fc74 100644
--- a/share/doc/papers/bufbio/Makefile
+++ b/share/doc/papers/bufbio/Makefile
@@ -1,9 +1,10 @@
# $FreeBSD$
-USE_PIC=1
-VOLUME= papers
-DOC= bio
-SRCS= bio.ms
-MACROS= -ms
+VOLUME= papers
+DOC= bio
+SRCS= bio.ms
+MACROS= -ms
+USE_PIC= YES
+CD_HACK= ${.CURDIR}
.include <bsd.doc.mk>
diff --git a/share/doc/papers/jail/Makefile b/share/doc/papers/jail/Makefile
index 71406dd..00177c2 100644
--- a/share/doc/papers/jail/Makefile
+++ b/share/doc/papers/jail/Makefile
@@ -1,8 +1,11 @@
# $FreeBSD$
-VOLUME= papers
-DOC= jail
-SRCS= paper.ms
-EXTRA= implementation.ms mgt.ms future.ms
-MACROS= -ms
+
+VOLUME= papers
+DOC= jail
+SRCS= paper.ms
+EXTRA= implementation.ms mgt.ms future.ms
+MACROS= -ms
+USE_SOELIM= YES
+CD_HACK= ${.CURDIR}
.include <bsd.doc.mk>
diff --git a/share/doc/papers/kernmalloc/Makefile b/share/doc/papers/kernmalloc/Makefile
index cda9219..ebb5cde 100644
--- a/share/doc/papers/kernmalloc/Makefile
+++ b/share/doc/papers/kernmalloc/Makefile
@@ -1,20 +1,18 @@
# From: @(#)Makefile 1.8 (Berkeley) 6/8/93
# $FreeBSD$
-VOLUME= papers
-DOC= kernmalloc
-SRCS= kernmalloc.ms appendix.ms
-SRCDIR= ${.OBJDIR} # ack!
-MACROS= -ms
-USE_TBL= yes
-USE_PIC= yes
-USE_EQN= yes
-CLEANFILES+= kernmalloc.ms appendix.ms
+VOLUME= papers
+DOC= kernmalloc
+SRCS= kernmalloc.t appendix.ms
+EXTRA= alloc.fig usage.tbl
+MACROS= -ms
+USE_EQN= YES
+USE_PIC= YES
+USE_SOELIM= YES
+USE_TBL= YES
+CLEANFILES= appendix.ms
-kernmalloc.ms: kernmalloc.t alloc.fig usage.tbl
- (cd ${.CURDIR}; ${SOELIM} kernmalloc.t) > ${.TARGET}
-
-appendix.ms: appendix.t
- vgrind -f < ${.CURDIR}/appendix.t > ${.TARGET}
+appendix.ms: appendix.t
+ ${GRIND} < ${.ALLSRC} > ${.TARGET}
.include <bsd.doc.mk>
diff --git a/share/doc/papers/px/Makefile b/share/doc/papers/px/Makefile
index 3a6cac7..54a8e1c 100644
--- a/share/doc/papers/px/Makefile
+++ b/share/doc/papers/px/Makefile
@@ -1,20 +1,17 @@
# From: @(#)Makefile 5.3 (Berkeley) 6/8/93
# $FreeBSD$
-VOLUME= papers
-DOC= px
-SRCS= tmac.p pxin0.n pxin1.n pxin2.n pxin3.n pxin4.n
-EXTRA= fig1.1.n fig1.2.n fig1.3.n fig2.3.raw fig2.4.n fig3.2.n \
- fig3.3.n table2.1.n table2.2.n table2.3.n table3.1.n
-OBJS= fig2.3.n
-CLEANFILES+=fig2.3.n
-MACROS= -ms
-
-USE_SOELIM= yes
-USE_SOELIMPP= yes
-USE_TBL= yes
+VOLUME= papers
+DOC= px
+SRCS= tmac.p pxin0.n pxin1.n pxin2.n pxin3.n pxin4.n
+EXTRA= fig1.1.n fig1.2.n fig1.3.n fig2.3.n fig2.4.n fig3.2.n \
+ fig3.3.n table2.1.n table2.2.n table2.3.n table3.1.n
+MACROS= -ms
+USE_SOELIM= YES
+USE_TBL= YES
+CLEANFILES= fig2.3.n
fig2.3.n: fig2.3.raw
- sort ${.CURDIR}/fig2.3.raw >fig2.3.n
+ sort ${.ALLSRC} >${.TARGET}
.include <bsd.doc.mk>
diff --git a/share/doc/papers/relengr/Makefile b/share/doc/papers/relengr/Makefile
index b22844b..5898b5a 100644
--- a/share/doc/papers/relengr/Makefile
+++ b/share/doc/papers/relengr/Makefile
@@ -1,12 +1,12 @@
# From: @(#)Makefile 1.6 (Berkeley) 6/8/93
# $FreeBSD$
-VOLUME= papers
-DOC= releng
-SRCS= 0.t 1.t 2.t 3.t
-MACROS= -ms
-EXTRA= ref.bib
-
-USE_REFER= yes
+VOLUME= papers
+DOC= releng
+SRCS= 0.t 1.t 2.t 3.t
+EXTRA= ref.bib
+MACROS= -ms
+USE_REFER= YES
+CD_HACK= ${.CURDIR}
.include <bsd.doc.mk>
diff --git a/share/doc/papers/sysperf/Makefile b/share/doc/papers/sysperf/Makefile
index 8494857..a6e89f5 100644
--- a/share/doc/papers/sysperf/Makefile
+++ b/share/doc/papers/sysperf/Makefile
@@ -1,16 +1,14 @@
# From: @(#)Makefile 1.6 (Berkeley) 6/8/93
# $FreeBSD$
-VOLUME= papers
-DOC= sysperf
-MACROS= -ms
-SRCS= 0.t 1.t 2.t 3.t 4.t 5.t 6.t 7.t
-EXTRA= a1.t a2.t
-SRCS+= appendix.tmp
+VOLUME= papers
+DOC= sysperf
+SRCS= 0.t 1.t 2.t 3.t 4.t 5.t 6.t 7.t appendix.tmp
+EXTRA= a1.t a2.t
+MACROS= -ms
+USE_EQN= YES
+USE_TBL= YES
CLEANFILES= appendix.tmp
-SRCDIR= ${.OBJDIR}
-USE_EQN= yes
-USE_TBL= yes
appendix.tmp: a1.t a2.t
${GRIND} ${.CURDIR}/a1.t | awk '/\.\(\)/{ cnt = 2 } \
diff --git a/share/doc/psd/01.cacm/Makefile b/share/doc/psd/01.cacm/Makefile
index 8471899..8dd5e41 100644
--- a/share/doc/psd/01.cacm/Makefile
+++ b/share/doc/psd/01.cacm/Makefile
@@ -1,12 +1,12 @@
# @(#)Makefile 8.1 (Berkeley) 6/8/93
# $FreeBSD$
-VOLUME= psd/01.cacm
-SRCS= p.mac p1 p2 p3 p4 p5 p6
-EXTRA= ref.bib
-MACROS= -ms
-
-USE_REFER= yes
-USE_TBL= yes
+VOLUME= psd/01.cacm
+SRCS= p.mac p1 p2 p3 p4 p5 p6
+EXTRA= ref.bib
+MACROS= -ms
+USE_REFER= YES
+USE_TBL= YES
+CD_HACK= ${.CURDIR}
.include <bsd.doc.mk>
diff --git a/share/doc/psd/02.implement/Makefile b/share/doc/psd/02.implement/Makefile
index e9baddf..67e415f 100644
--- a/share/doc/psd/02.implement/Makefile
+++ b/share/doc/psd/02.implement/Makefile
@@ -1,13 +1,13 @@
# @(#)Makefile 8.1 (Berkeley) 6/8/93
# $FreeBSD$
-VOLUME= psd/02.implement
-SRCS= implement
-EXTRA= ref.bib
-MACROS= -ms
-
-USE_PIC= yes
-USE_REFER= yes
-USE_SOELIM= yes
+VOLUME= psd/02.implement
+SRCS= implement
+EXTRA= ref.bib
+MACROS= -ms
+USE_PIC= YES
+USE_REFER= YES
+USE_SOELIM= YES
+CD_HACK= ${.CURDIR}
.include <bsd.doc.mk>
diff --git a/share/doc/psd/12.make/Makefile b/share/doc/psd/12.make/Makefile
index b266f9b..fdc38a7 100644
--- a/share/doc/psd/12.make/Makefile
+++ b/share/doc/psd/12.make/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
VOLUME= psd/12.make
-SRCS= tutorial.ms
+SRCS= stubs tutorial.ms
MACROS= -ms
SRCDIR= ${.CURDIR}/../../../../usr.bin/make/PSD.doc
diff --git a/share/doc/psd/15.yacc/Makefile b/share/doc/psd/15.yacc/Makefile
index 293ead5..9dc4a1d 100644
--- a/share/doc/psd/15.yacc/Makefile
+++ b/share/doc/psd/15.yacc/Makefile
@@ -1,11 +1,11 @@
# @(#)Makefile 8.1 (Berkeley) 8/14/93
# $FreeBSD$
-VOLUME= psd/15.yacc
-SRCS= ss.. ss0 ss1 ss2 ss3 ss4 ss5 ss6 ss7 ss8 ss9 ssA ssB ssa ssb ssc ssd
-EXTRA= ref.bib
-MACROS= -ms
-
-USE_REFER= yes
+VOLUME= psd/15.yacc
+SRCS= ss.. ss0 ss1 ss2 ss3 ss4 ss5 ss6 ss7 ss8 ss9 ssA ssB ssa ssb ssc ssd
+EXTRA= ref.bib
+MACROS= -ms
+USE_REFER= YES
+CD_HACK= ${.CURDIR}
.include <bsd.doc.mk>
diff --git a/share/doc/psd/22.rpcgen/Makefile b/share/doc/psd/22.rpcgen/Makefile
index d383228..4d14019 100644
--- a/share/doc/psd/22.rpcgen/Makefile
+++ b/share/doc/psd/22.rpcgen/Makefile
@@ -1,10 +1,9 @@
# $FreeBSD$
-VOLUME= psd/22.rpcgen
-SRCS= rpcgen.ms
-MACROS= -ms
-SRCDIR= ${.CURDIR}/../../../../lib/libc/rpc/PSD.doc
-
-USE_TBL= yes
+VOLUME= psd/22.rpcgen
+SRCS= stubs rpcgen.ms
+MACROS= -ms
+USE_TBL= YES
+SRCDIR= ${.CURDIR}/../../../../lib/libc/rpc/PSD.doc
.include <bsd.doc.mk>
diff --git a/share/doc/psd/23.rpc/Makefile b/share/doc/psd/23.rpc/Makefile
index 16247c8..00e15d8 100644
--- a/share/doc/psd/23.rpc/Makefile
+++ b/share/doc/psd/23.rpc/Makefile
@@ -1,11 +1,10 @@
# $FreeBSD$
-VOLUME= psd/23.rpc
-SRCS= rpc.prog.ms
-MACROS= -ms
-SRCDIR= ${.CURDIR}/../../../../lib/libc/rpc/PSD.doc
-
-USE_TBL= yes
-USE_PIC= yes
+VOLUME= psd/23.rpc
+SRCS= stubs rpc.prog.ms
+MACROS= -ms
+USE_TBL= YES
+USE_PIC= YES
+SRCDIR= ${.CURDIR}/../../../../lib/libc/rpc/PSD.doc
.include <bsd.doc.mk>
diff --git a/share/doc/psd/24.xdr/Makefile b/share/doc/psd/24.xdr/Makefile
index 8e4f218..2338152 100644
--- a/share/doc/psd/24.xdr/Makefile
+++ b/share/doc/psd/24.xdr/Makefile
@@ -1,10 +1,9 @@
# $FreeBSD$
-VOLUME= psd/24.xdr
-SRCS= xdr.nts.ms
-MACROS= -ms
-SRCDIR= ${.CURDIR}/../../../../lib/libc/rpc/PSD.doc
-
-USE_EQN= yes
+VOLUME= psd/24.xdr
+SRCS= stubs xdr.nts.ms
+MACROS= -ms
+USE_EQN= YES
+SRCDIR= ${.CURDIR}/../../../../lib/libc/rpc/PSD.doc
.include <bsd.doc.mk>
diff --git a/share/doc/psd/25.xdrrfc/Makefile b/share/doc/psd/25.xdrrfc/Makefile
index b2281b2..07e5ec1 100644
--- a/share/doc/psd/25.xdrrfc/Makefile
+++ b/share/doc/psd/25.xdrrfc/Makefile
@@ -1,10 +1,9 @@
# $FreeBSD$
-VOLUME= psd/25.xdrrfc
-SRCS= xdr.rfc.ms
-MACROS= -ms
-SRCDIR= ${.CURDIR}/../../../../lib/libc/rpc/PSD.doc
-
-USE_TBL= yes
+VOLUME= psd/25.xdrrfc
+SRCS= stubs xdr.rfc.ms
+MACROS= -ms
+USE_TBL= YES
+SRCDIR= ${.CURDIR}/../../../../lib/libc/rpc/PSD.doc
.include <bsd.doc.mk>
diff --git a/share/doc/psd/26.rpcrfc/Makefile b/share/doc/psd/26.rpcrfc/Makefile
index b61fb9f..233aa99 100644
--- a/share/doc/psd/26.rpcrfc/Makefile
+++ b/share/doc/psd/26.rpcrfc/Makefile
@@ -1,10 +1,9 @@
# $FreeBSD$
-VOLUME= psd/26.rpcrfc
-SRCS= rpc.rfc.ms
-MACROS= -ms
-SRCDIR= ${.CURDIR}/../../../../lib/libc/rpc/PSD.doc
-
-USE_TBL= yes
+VOLUME= psd/26.rpcrfc
+SRCS= stubs rpc.rfc.ms
+MACROS= -ms
+USE_TBL= YES
+SRCDIR= ${.CURDIR}/../../../../lib/libc/rpc/PSD.doc
.include <bsd.doc.mk>
diff --git a/share/doc/psd/27.nfsrpc/Makefile b/share/doc/psd/27.nfsrpc/Makefile
index e01f6af..3eaa6e8 100644
--- a/share/doc/psd/27.nfsrpc/Makefile
+++ b/share/doc/psd/27.nfsrpc/Makefile
@@ -1,10 +1,9 @@
# $FreeBSD$
-VOLUME= psd/27.nfsrfc
-SRCS= nfs.rfc.ms
-MACROS= -ms
-SRCDIR= ${.CURDIR}/../../../../lib/libc/rpc/PSD.doc
-
-USE_TBL= yes
+VOLUME= psd/27.nfsrfc
+SRCS= stubs nfs.rfc.ms
+MACROS= -ms
+USE_TBL= YES
+SRCDIR= ${.CURDIR}/../../../../lib/libc/rpc/PSD.doc
.include <bsd.doc.mk>
diff --git a/share/doc/usd/13.viref/Makefile b/share/doc/usd/13.viref/Makefile
index e71a444..001bb47 100644
--- a/share/doc/usd/13.viref/Makefile
+++ b/share/doc/usd/13.viref/Makefile
@@ -1,27 +1,25 @@
# From: @(#)Makefile 8.16 (Berkeley) 8/15/94
# $FreeBSD$
-VOLUME= usd/13.viref
-SRCS= vi.ref
-EXTRA= ex.cmd.roff ref.so set.opt.roff vi.cmd.roff
-OBJS= index.so
-MACROS= -me -U
-CLEANFILES+=index index.so
-USE_SOELIM= yes
-USE_SOELIMPP= yes
-USE_TBL= yes
-SRCDIR= ${.CURDIR}/../../../../contrib/nvi/docs/USD.doc/vi.ref
+VOLUME= usd/13.viref
+SRCS= vi.ref
+EXTRA= ex.cmd.roff ref.so set.opt.roff vi.cmd.roff index.so
+MACROS= -me
+CLEANFILES= index index.so
+TRFLAGS= -U # this is to hide warnings only
+USE_SOELIM= YES
+USE_TBL= YES
+SRCDIR= ${.CURDIR}/../../../../contrib/nvi/docs/USD.doc/vi.ref
# Build index.so as a side-effect of building the paper.
-index.so: ${SRCS} ${EXTRA}
- (cd ${SRCDIR}; ${SOELIMPP} -e 's:^\.so index.so$$::' ${SRCS}) | \
- ${ROFF} > /dev/null
+index.so: ${SRCS} ${EXTRA:Nindex.so}
+ (cd ${SRCDIR}; sed -e 's:^\.so index.so$$::' ${SRCS}) | ${ROFF} -U -z
sed -e 's/MINUSSIGN/-/' \
-e 's/DOUBLEQUOTE/""/' \
-e "s/SQUOTE/'/" \
-e 's/ /__SPACE/g' < index | \
sort -u '-t ' -k 1,1 -k 2n | awk -f ${SRCDIR}/merge.awk | \
sed -e 's/__SPACE/ /g' \
- -e "s/^\\(['\\.]\\)/\\\\\&\\1/" > index.so
+ -e "s/^\\(['\\.]\\)/\\\\\&\\1/" > index.so
.include <bsd.doc.mk>
diff --git a/share/doc/usd/19.memacros/Makefile b/share/doc/usd/19.memacros/Makefile
index 7378d09..4966e36 100644
--- a/share/doc/usd/19.memacros/Makefile
+++ b/share/doc/usd/19.memacros/Makefile
@@ -1,14 +1,11 @@
# From: @(#)Makefile 8.1 (Berkeley) 6/8/93
# $FreeBSD$
-VOLUME= usd/19.memacros
-SRCS= meintro.me-sed
-MACROS= -me
-SRCDIR= ${.OBJDIR}
-
-GROFFDIR=${.CURDIR}/../../../../contrib/groff
-
-.PATH: ${GROFFDIR}/doc
+VOLUME= usd/19.memacros
+SRCS= meintro.me-sed
+MACROS= -me
+GROFFDIR= ${.CURDIR}/../../../../contrib/groff
+SRCDIR= ${GROFFDIR}/doc
version=`cat ${GROFFDIR}/VERSION`
revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' ${GROFFDIR}/REVISION`
@@ -16,6 +13,6 @@ revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' ${GROFFDIR}/REVISION`
meintro.me-sed: meintro.me
sed -e "s;@VERSION@;$(version)$(revision);" ${.ALLSRC} > ${.TARGET}
-CLEANFILES+=${SRCS}
+CLEANFILES= ${SRCS}
.include <bsd.doc.mk>
diff --git a/share/doc/usd/20.meref/Makefile b/share/doc/usd/20.meref/Makefile
index f4bf738..af30e9b 100644
--- a/share/doc/usd/20.meref/Makefile
+++ b/share/doc/usd/20.meref/Makefile
@@ -1,14 +1,11 @@
# From: @(#)Makefile 8.1 (Berkeley) 6/8/93
# $FreeBSD$
-VOLUME= usd/20.meref
-SRCS= meref.me-sed
-MACROS= -me
-SRCDIR= ${.OBJDIR}
-
-GROFFDIR=${.CURDIR}/../../../../contrib/groff
-
-.PATH: ${GROFFDIR}/doc
+VOLUME= usd/20.meref
+SRCS= meref.me-sed
+MACROS= -me
+GROFFDIR= ${.CURDIR}/../../../../contrib/groff
+SRCDIR= ${GROFFDIR}/doc
version=`cat ${GROFFDIR}/VERSION`
revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' ${GROFFDIR}/REVISION`
@@ -16,6 +13,6 @@ revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' ${GROFFDIR}/REVISION`
meref.me-sed: meref.me
sed -e "s;@VERSION@;$(version)$(revision);" ${.ALLSRC} > ${.TARGET}
-CLEANFILES+=${SRCS}
+CLEANFILES= ${SRCS}
.include <bsd.doc.mk>
diff --git a/share/doc/usd/21.troff/Makefile b/share/doc/usd/21.troff/Makefile
index e4fbf35..0f9bfa2 100644
--- a/share/doc/usd/21.troff/Makefile
+++ b/share/doc/usd/21.troff/Makefile
@@ -1,10 +1,8 @@
# @(#)Makefile 8.1 (Berkeley) 8/14/93
# $FreeBSD$
-VOLUME= usd/21.troff
-SRCS= m0 m0a m1 m2 m3 m4 m5
-SRCS+= table1 table2
-MACROS= m.mac
-USE_TBL=YES
+VOLUME= usd/21.troff
+SRCS= m.mac m0 m0a m1 m2 m3 m4 m5 table1 table2
+USE_TBL= YES
.include <bsd.doc.mk>
diff --git a/share/doc/usd/22.trofftut/Makefile b/share/doc/usd/22.trofftut/Makefile
index 8ccc0bd..a3f32fd 100644
--- a/share/doc/usd/22.trofftut/Makefile
+++ b/share/doc/usd/22.trofftut/Makefile
@@ -41,6 +41,5 @@ VOLUME= usd/22.trofftut
SRCS= tt.mac tt00 tt01 tt02 tt03 tt04 tt05 tt06 tt07 tt08 tt09 tt10 \
tt11 tt12 tt13 tt14 ttack ttcharset ttindex
MACROS= -ms
-SRCDIR= ${.OBJDIR}
.include <bsd.doc.mk>
diff --git a/share/mk/bsd.doc.mk b/share/mk/bsd.doc.mk
index f15f33a..d27372a 100644
--- a/share/mk/bsd.doc.mk
+++ b/share/mk/bsd.doc.mk
@@ -26,16 +26,11 @@ INDXBIB?= indxbib
PIC?= pic
REFER?= refer
.if ${PRINTERDEVICE} == "ascii"
-ROFF?= groff -mtty-char ${TRFLAGS} ${MACROS} -o${PAGES}
+ROFF?= groff -mtty-char ${TRFLAGS} ${MACROS} -o${PAGES}
.else
ROFF?= groff ${TRFLAGS} ${MACROS} -o${PAGES}
.endif
SOELIM?= soelim
-SOELIMPP= sed ${SOELIMPPARGS}
-SOELIMPPARGS0= ${SRCS} ${EXTRA}
-SOELIMPPARGS1= ${SOELIMPPARGS0:S/^/-e\\ \'s:\(\.so[\\ \\ ][\\ \\ ]*\)\(/}
-SOELIMPPARGS2= ${SOELIMPPARGS1:S/$/\)\$:\1${SRCDIR}\/\2:\'/}
-SOELIMPPARGS= ${SOELIMPPARGS2:S/\\'/'/g}
TBL?= tbl
DOC?= paper
@@ -45,25 +40,24 @@ TRFLAGS+= -T${PRINTERDEVICE}
.if defined(USE_EQN)
TRFLAGS+= -e
.endif
-.if defined(USE_TBL)
-TRFLAGS+= -t
-.endif
.if defined(USE_PIC)
TRFLAGS+= -p
.endif
-.if defined(USE_SOELIM)
-TRFLAGS+= -s
-.endif
.if defined(USE_REFER)
TRFLAGS+= -R
.endif
+.if defined(USE_SOELIM)
+TRFLAGS+= -I${SRCDIR}
+.endif
+.if defined(USE_TBL)
+TRFLAGS+= -t
+.endif
DCOMPRESS_EXT?= ${COMPRESS_EXT}
.if defined(NODOCCOMPRESS) || ${PRINTERDEVICE} == "html"
-DFILE= ${DOC}.${PRINTERDEVICE}
-DCOMPRESS_CMD= cat
+DFILE= ${DOC}.${PRINTERDEVICE}
.else
-DFILE= ${DOC}.${PRINTERDEVICE}${DCOMPRESS_EXT}
+DFILE= ${DOC}.${PRINTERDEVICE}${DCOMPRESS_EXT}
DCOMPRESS_CMD?= ${COMPRESS_CMD}
.endif
@@ -77,12 +71,12 @@ UNROFFFLAGS+= split=1
.endif
# Compatibility mode flag for groff. Use this when formatting documents with
-# Berkeley me macros.
+# Berkeley me macros (orig_me(7)).
COMPAT?= -C
.PATH: ${.CURDIR} ${SRCDIR}
-all: ${DFILE}
+all: ${DFILE}
.if !target(print)
print: ${DFILE}
@@ -103,36 +97,46 @@ CLEANFILES+= ${DOC}.ascii ${DOC}.ascii${DCOMPRESS_EXT} \
realinstall:
.if ${PRINTERDEVICE} == "html"
cd ${SRCDIR}; \
- ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
- ${DOC}*.html ${DESTDIR}${BINDIR}/${VOLUME}
+ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ ${DOC}*.html ${DESTDIR}${BINDIR}/${VOLUME}
.else
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
- ${DFILE} ${DESTDIR}${BINDIR}/${VOLUME}
+ ${DFILE} ${DESTDIR}${BINDIR}/${VOLUME}
.endif
spell: ${SRCS}
- (cd ${.CURDIR}; spell ${SRCS} ) | sort | \
+ (cd ${.CURDIR}; spell ${SRCS} ) | sort | \
comm -23 - ${.CURDIR}/spell.ok > ${DOC}.spell
BINDIR?= /usr/share/doc
-BINMODE= 444
+BINMODE= 444
SRCDIR?= ${.CURDIR}
.if !target(${DFILE})
-_stamp.extraobjs: ${EXTRA} ${OBJS}
+.if defined(EXTRA) && !empty(EXTRA)
+_stamp.extra: ${EXTRA}
touch ${.TARGET}
-CLEANFILES+= _stamp.extraobjs
-${DFILE}: ${SRCS} _stamp.extraobjs
+CLEANFILES+= _stamp.extra
+${DFILE}: _stamp.extra
+.endif
+${DFILE}: ${SRCS}
.if ${PRINTERDEVICE} == "html"
cd ${SRCDIR}; ${UNROFF} ${MACROS} ${UNROFFFLAGS} \
document=${DOC} ${SRCS}
-.elif defined(USE_SOELIMPP)
- ${SOELIMPP} ${.ALLSRC:N_stamp.extraobjs} | ${ROFF} | \
- ${DCOMPRESS_CMD} > ${.TARGET}
+.elif defined(NODOCCOMPRESS)
+.if defined(CD_HACK)
+ (cd ${CD_HACK}; ${ROFF} ${.ALLSRC:N_stamp.extra}) > ${.TARGET}
.else
- (cd ${SRCDIR}; ${ROFF} ${.ALLSRC:N_stamp.extraobjs}) | \
+ ${ROFF} ${.ALLSRC:N_stamp.extra} > ${.TARGET}
+.endif
+.else
+.if defined(CD_HACK)
+ (cd ${CD_HACK}; ${ROFF} ${.ALLSRC:N_stamp.extra}) | \
${DCOMPRESS_CMD} > ${.TARGET}
+.else
+ ${ROFF} ${.ALLSRC:N_stamp.extra} | ${DCOMPRESS_CMD} > ${.TARGET}
+.endif
.endif
.endif
OpenPOWER on IntegriCloud