#
# Sun RPC is a product of Sun Microsystems, Inc. and is provided for
# unrestricted use provided that this legend is included on all tape
# media and as a part of the software program in whole or part.  Users
# may copy or modify Sun RPC without charge, but are not authorized
# to license or distribute it to anyone else except as part of a product or
# program developed by the user or with the express written consent of
# Sun Microsystems, Inc.
#
# SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
# WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
# PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
#
# Sun RPC is provided with no support and without any obligation on the
# part of Sun Microsystems, Inc. to assist in its use, correction,
# modification or enhancement.
#
# SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
# INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
# OR ANY PART THEREOF.
#
# In no event will Sun Microsystems, Inc. be liable for any lost revenue
# or profits or other special, indirect and consequential damages, even if
# Sun has been advised of the possibility of such damages.
#
# Sun Microsystems, Inc.
# 2550 Garcia Avenue
# Mountain View, California  94043
#
#
# @(#)Makefile 1.3 91/03/11 TIRPC 1.0; from 2.1 88/08/04 4.0 RPCSRC
#
#
#   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=	troff
TOPTS=  -t
NROFF=	nroff
NOPTS=
PIC=	pic
TBL=	tbl
EQN=	eqn

SRC=	 cover.ms rpcintro.ms rpcgen.ms rpcprog.ms xdr.nts.ms \
         xdr.rfc.ms rpc.rfc.ms nfs.rfc.ms end.ms

all default: all.nroff

install:	all.nroff
	@echo "Sorry, we don't do installs.  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

#

rpcintro.nroff: rpcintro.ms
	${NROFF} ${NOPTS} -ms cover.ms rpcintro.ms end.ms >rpcintro.nroff

rpcintro.troff:	rpcintro.ms
	${PIC} cover.ms rpcintro.ms end.ms | ${TROFF} ${TOPTS} -ms >rpcintro.troff

#

rpcprog.nroff: rpcprog.ms
	${TBL} cover.ms rpcprog.ms end.ms | ${NROFF} ${NOPTS} -ms >rpcprog.nroff

rpcprog.troff:	rpcprog.ms
	${TBL} cover.ms rpcprog.ms end.ms | ${TROFF} ${TOPTS} -ms >rpcprog.troff


#

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

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

#

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

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

#

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

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

#

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

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

#

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

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

clean:
	rm -f *.nroff *.troff

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