Merge from vendor branch DIFFUTILS:
[dragonfly.git] / share / doc / usd / 13.viref / Makefile
1 #       From: @(#)Makefile      8.16 (Berkeley) 8/15/94
2 # $FreeBSD: src/share/doc/usd/13.viref/Makefile,v 1.8.2.2 2000/12/01 11:34:38 ru Exp $
3 # $DragonFly: src/share/doc/usd/13.viref/Makefile,v 1.2 2003/06/17 04:36:57 dillon Exp $
4
5 VOLUME= usd/13.viref
6 SRCS=   vi.ref
7 EXTRA=  ex.cmd.roff ref.so set.opt.roff vi.cmd.roff
8 OBJS=   index.so
9 MACROS= -me -U
10 CLEANFILES+=index index.so
11 USE_SOELIM=     yes
12 USE_SOELIMPP=   yes
13 USE_TBL=        yes
14 SRCDIR= ${.CURDIR}/../../../../contrib/nvi/docs/USD.doc/vi.ref
15
16 # Build index.so as a side-effect of building the paper.
17 index.so: ${SRCS} ${EXTRA}
18         (cd ${SRCDIR}; ${SOELIMPP} -e 's:^\.so index.so$$::' ${SRCS}) | \
19         ${ROFF} > /dev/null
20         sed -e 's/MINUSSIGN/-/' \
21             -e 's/DOUBLEQUOTE/""/' \
22             -e "s/SQUOTE/'/" \
23             -e 's/ /__SPACE/g' < index | \
24         sort -u '-t     ' +0 -1 +1n | awk -f ${SRCDIR}/merge.awk | \
25         sed -e 's/__SPACE/ /g' \
26             -e "s/^\\(['\\.]\\)/\\\\\&\\1/" > index.so 
27
28 .include <bsd.doc.mk>