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