summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2002-10-29 15:51:37 +0000
committerru <ru@FreeBSD.org>2002-10-29 15:51:37 +0000
commit3f90b796ab64cdaff8d41d5a678c2bd9c2461abe (patch)
tree3ee480b640455c730fa658c107f2da4442bb59be /share
parent6878955e085cf75d859aac36f617024e7ca60650 (diff)
downloadFreeBSD-src-3f90b796ab64cdaff8d41d5a678c2bd9c2461abe.zip
FreeBSD-src-3f90b796ab64cdaff8d41d5a678c2bd9c2461abe.tar.gz
Index is unique for each PRINTERDEVICE.
Abuse .for so that the variable expansion works inside the N modifier. This won't be a simple abuse with the next version of bsd.doc.mk which will support multi-value PRINTERDEVICE.
Diffstat (limited to 'share')
-rw-r--r--share/doc/usd/13.viref/Makefile22
1 files changed, 16 insertions, 6 deletions
diff --git a/share/doc/usd/13.viref/Makefile b/share/doc/usd/13.viref/Makefile
index 001bb47..7d42600 100644
--- a/share/doc/usd/13.viref/Makefile
+++ b/share/doc/usd/13.viref/Makefile
@@ -2,24 +2,34 @@
# $FreeBSD$
VOLUME= usd/13.viref
-SRCS= vi.ref
-EXTRA= ex.cmd.roff ref.so set.opt.roff vi.cmd.roff index.so
+SRCS= vi.ref-patched
+EXTRA= ex.cmd.roff ref.so set.opt.roff vi.cmd.roff
MACROS= -me
-CLEANFILES= index index.so
+CLEANFILES= vi.ref-patched index
TRFLAGS= -U # this is to hide warnings only
USE_SOELIM= YES
USE_TBL= YES
SRCDIR= ${.CURDIR}/../../../../contrib/nvi/docs/USD.doc/vi.ref
+vi.ref-patched: vi.ref
+ sed -e 's:^\.so index.so$$:&.\\*[.T]:' ${.ALLSRC} > ${.TARGET}
+
+PRINTERDEVICE?= ascii
+.for _dev in ${PRINTERDEVICE}
+EXTRA+= index.so.${_dev}
+CLEANFILES+= index.so.${_dev}
+
# Build index.so as a side-effect of building the paper.
-index.so: ${SRCS} ${EXTRA:Nindex.so}
- (cd ${SRCDIR}; sed -e 's:^\.so index.so$$::' ${SRCS}) | ${ROFF} -U -z
+index.so.${_dev}: ${SRCS} ${EXTRA:Nindex.so.${_dev}}
+ sed -e 's:^\.so index\.so\.\\\*\[\.T\]$$::' vi.ref-patched | \
+ ${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/" > ${.TARGET}
+.endfor
.include <bsd.doc.mk>
OpenPOWER on IntegriCloud