xref: /minix3/external/bsd/nvi/docs/USD.doc/vi.ref/Makefile (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1#	$NetBSD: Makefile,v 1.5 2014/09/10 21:44:22 christos Exp $
2#
3#	@(#)Makefile	8.20 (Berkeley) 8/18/96
4
5SECTION=	reference/ref1
6ARTICLE=	vi
7SRCS=		vi.ref
8DEPSRCS=	ex.cmd.roff set.opt.roff vi.cmd.roff ref.so index.so
9# Add -U to the macros if you want to build the index since it needs
10# unsafe mode for .sy
11MACROS=		-me
12ROFF_TBL=	yes
13CLEANFILES+=	index index.so
14
15.include <bsd.doc.mk>
16
17# index.so is generated.
18index.so: vi.ref
19	${TOOL_SOELIM} -I${.CURDIR} ${.ALLSRC} | ${TOOL_TBL} | \
20	    ${TOOL_ROFF_PS} ${MACROS} > /dev/null
21	sed -e 's/MINUSSIGN/\\-/' \
22	    -e 's/DOUBLEQUOTE/""/' \
23	    -e "s/SQUOTE/'/" \
24	    -e 's/ /__SPACE/g' < index | \
25	sort -u '-t	' +0 -1 +1n | awk -f ${.CURDIR}/merge.awk | \
26	sed -e 's/__SPACE/ /g' > $@
27	rm -f index
28