# $Header: Makefile,v 4.300 91/06/08 01:33:21 root Rel41 $ SONY;
#
# @(#)Makefile	1.2 88/08/09 4.0NFSSRC
#
#
#   The targets all.nroff and all.troff will make monolithic documents
#   with nroff and troff, respectively.  The other *.nroff and *.troff
#   targets will make individual documents
#
TROFF=	ditroff
TOPTS=  -t
NROFF=	nroff
NOPTS=
PIC=	pic
TBL=	tbl
EQN=	eqn

SRC=	 intro.ms rpc.prog.ms rpcgen.ms xdr.nts.ms xdr.rfc.ms rpc.rfc.ms \
         nfs.rfc.ms nfs.admin.ms yp.admin.ms nfs.secure.ms

all default: all.troff
#all default: all.nroff

install:	all.nroff
	@echo "Nothing installed."

all.nroff:	${SRC}
	${TBL} ${SRC} | ${EQN} | ${NROFF} ${NOPTS} -ms >all.nroff

all.troff:	${SRC}
	${TBL} ${SRC} | ${PIC} | ${EQN} | ${TROFF} ${TOPTS} -ms >all.troff

#

intro.nroff: intro.ms
	${TBL} intro.ms | ${NROFF} ${NOPTS} -ms >intro.nroff

intro.troff:	intro.ms
	${TBL} intro.ms | ${PIC} | ${TROFF} ${TOPTS} -ms >intro.troff

#

rpc.prog.nroff: rpc.prog.ms
	${TBL} rpc.prog.ms | ${NROFF} ${NOPTS} -ms >rpc.prog.nroff

rpc.prog.troff:	rpc.prog.ms
	${TBL} rpc.prog.ms | ${PIC} | ${TROFF} ${TOPTS} -ms >rpc.prog.troff

#

rpcgen.troff:	rpcgen.ms
	${TBL} rpcgen.ms | ${TROFF} ${TOPTS} -ms >rpcgen.troff

rpcgen.nroff:	rpcgen.ms
	${TBL} rpcgen.ms | ${NROFF} ${NOPTS} -ms >rpcgen.nroff

#

xdr.nts.troff: xdr.nts.ms
	${TBL} xdr.nts.ms | ${EQN} | ${TROFF} ${TOPTS} -ms >xdr.nts.troff

xdr.nts.nroff: xdr.nts.ms
	${TBL} xdr.nts.ms | ${EQN} | ${NROFF} ${NOPTS} -ms >xdr.nts.nroff

#

xdr.rfc.troff: xdr.rfc.ms
	${TBL} xdr.rfc.ms | ${TROFF} ${TOPTS} -ms >xdr.rfc.troff

xdr.rfc.nroff: xdr.rfc.ms
	${TBL} xdr.rfc.ms | ${NROFF} ${NOPTS} -ms >xdr.rfc.nroff

#

rpc.rfc.troff: rpc.rfc.ms
	${TBL} rpc.rfc.ms | ${TROFF} ${TOPTS} -ms >rpc.rfc.troff

rpc.rfc.nroff: rpc.rfc.ms
	${TBL} rpc.rfc.ms | ${NROFF} ${NOPTS} -ms >rpc.rfc.nroff

#

nfs.rfc.troff: nfs.rfc.ms
	${TBL} nfs.rfc.ms | ${TROFF} ${TOPTS} -ms >nfs.rfc.troff

nfs.rfc.nroff: nfs.rfc.ms
	${TBL} nfs.rfc.ms | ${NROFF} ${NOPTS} -ms >nfs.rfc.nroff

#

nfs.admin.troff: nfs.admin.ms
	${TROFF} ${TOPTS} -ms nfs.admin.ms >nfs.admin.troff

nfs.admin.nroff: nfs.admin.ms
	${NROFF} ${NOPTS} -ms nfs.admin.ms >nfs.admin.nroff

#

yp.admin.troff: yp.admin.ms
	${TROFF} ${TOPTS} -ms yp.admin.ms >yp.admin.troff

yp.admin.nroff: yp.admin.ms
	${NROFF} ${NOPTS} -ms yp.admin.ms >yp.admin.nroff

#

nfs.secure.troff: nfs.secure.ms
	${TBL} nfs.secure.ms | ${EQN} | ${PIC} | ${TROFF} ${TOPTS} -ms >nfs.secure.troff

nfs.secure.nroff: nfs.secure.ms
	${TBL} nfs.secure.ms | ${EQN} | ${NROFF} ${NOPTS} -ms >nfs.secure.nroff

clean:
	rm -f *.nroff *.troff *.spell core

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