1VOLUME= usd/13.viref 2EXTRA= ex.cmd.roff ref.so set.opt.roff vi.cmd.roff 3MACROS= -me 4CLEANFILES= vi.ref-patched index 5TRFLAGS= -U # this is to hide warnings only 6USE_SOELIM= 7USE_TBL= 8 9vi.ref-patched: vi.ref 10 sed -e 's:^\.so index.so$$:&.\\*[.T]:' ${.ALLSRC} > ${.TARGET} 11 12PRINTERDEVICE?= ascii 13.for _dev in ${PRINTERDEVICE} 14SRCS+= vi.ref-${_dev} 15EXTRA+= index.so.${_dev} 16CLEANFILES+= index.so.${_dev} vi.ref-${_dev} 17 18vi.ref-${_dev}: index.so.${_dev} 19 sed -e 's:^\.so index\.so\.\\\*\[\.T\]$$:${_dev}:' vi.ref-patched > ${.TARGET} 20 21# Build index.so as a side-effect of building the paper. 22index.so.${_dev}: vi.ref-patched ${EXTRA:Nindex.so.${_dev}} 23 sed -e 's:^\.so index\.so\.\\\*\[\.T\]$$::' vi.ref-patched | \ 24 ${ROFF.${_dev}} -U -z 25 sed -e 's/MINUSSIGN/-/' \ 26 -e 's/DOUBLEQUOTE/""/' \ 27 -e "s/SQUOTE/'/" \ 28 -e 's/ /__SPACE/g' < index | \ 29 sort -u '-t ' -k 1,1 -k 2n | awk -f ${.CURDIR}/merge.awk | \ 30 sed -e 's/__SPACE/ /g' \ 31 -e "s/^\\(['\\.]\\)/\\\\\&\\1/" > ${.TARGET} 32.endfor 33 34.include <bsd.doc.mk> 35