# $Header: Makefile,v 4.300 91/06/08 01:49:16 root Rel41 $ SONY;
#
# Copyright (c) 1986 Regents of the University of California.
# All rights reserved.  The Berkeley software License Agreement
# specifies the terms and conditions for redistribution.
#
#	@(#)Makefile	6.1 (Berkeley) 5/30/86
#
SRCS=	vi.in vi.chars
#MACROS=	-msU
MACROS=	-ms
TBL=	tbl
TROFF=	ditroff

paper:	paper.out summary.out viapwh.out
	lpr -n paper.out
	lpr -n summary.out
	lpr -n viapwh.out

xprev:	paper.out summary.out viapwh.out
	xprev paper.out
	xprev summary.out
	xprev viapwh.out

paper.out: ${SRCS}
	${TBL} ${SRCS} | ${TROFF} ${MACROS} -t > paper.out

summary.out: vi.summary
	${TBL} vi.summary | ${TROFF} ${MACROS} -t > summary.out

viapwh.out: vi.apwh.ms
	${TROFF} ${MACROS} -t vi.apwh.ms > viapwh.out

clean:
	-rm -f paper.[PT]* summary.[PT]* viapwh.[PT]* *.spell errs Errs make.out
	-rm -f paper.out summary.out viapwh.out

spell:	${SRCS}
	@for i in ${SRCS}; do \
		echo $$i; spell $$i | sort | comm -23 - spell.ok > $$i.spell; \
	done
