diff options
author | Ruslan Ermilov <ru@FreeBSD.org> | 2002-10-29 15:51:37 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@FreeBSD.org> | 2002-10-29 15:51:37 +0000 |
commit | 3c193bda8abd167a8850338025804856d57bfc9d (patch) | |
tree | 3ee480b640455c730fa658c107f2da4442bb59be | |
parent | 6bd34a1e6fc1f6016f9f4af387ec7526e1db3d2b (diff) |
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.
Notes
Notes:
svn path=/head/; revision=106150
-rw-r--r-- | share/doc/usd/13.viref/Makefile | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/share/doc/usd/13.viref/Makefile b/share/doc/usd/13.viref/Makefile index 001bb47c23cd..7d4260019ed9 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> |