#	"install" is site specific, as are most of the others -- be warned!
#	"listings" will "nroff" all the manuals suitably for a line printer
#
FFLAG		= -F
NAME		= Manuals
PRSPOOLER	= apr -mManuals -i
PRSPOOL		= $(PRSPOOLER)$(NAME)
PRFORMATTER	= pr -l66 -w132 -f -n3

RM		= /bin/rm -f

MANUALS		= ACSnet.1 NNcall.1 NNdaemon.1 NNshell.1 \
		  acscall.1 acspurge.1 acsq.1 acsrequest.1 \
		  acsstate.1 acsstop.1 acswhois.1 con.1 dis.1 fetchfile.1 \
		  getfile.1 linkstats.1 rundaemon.1 sendfile.1 \
		  directory.3 proto.3 \
		  proto.5 \
		  ACSnet.7

LISTINGS	= ACSnet.q NNcall.q NNdaemon.q NNshell.q \
		  acscall.q acspurge.q acsq.q acsrequest.q \
		  acsstate.q acsstop.q acswhois.q con.q dis.q fetchfile.q \
		  getfile.q linkstats.q rundaemon.q sendfile.q \
		  directory.q proto.q \
		  proto.q \
		  ACSnet7.q

.SUFFIXES:	.q .1 .3 .5 .7

.1.q:
		nroff $(FFLAG) -man -Tlp $< >$*.q

.3.q:
		nroff $(FFLAG) -man -Tlp $< >$*.q

.5.q:
		nroff $(FFLAG) -man -Tlp $< >$*.q

.7.q:
		nroff $(FFLAG) -man -Tlp $< >$*7.q

all:

install:	$(MANUALS)
		@-for i in $(MANUALS) ; \
		do \
			section=`expr $$i : '.*\.\(.\).*'` ; \
			x=`datenum $$i` ; \
			y=`datenum ~man/man$${section}/$$i 2>/dev/null` ; \
			if [ 0$$x -le 0$$y ] ; \
			then \
				continue ; \
			fi ; \
			cp $$i ~man/man$${section} ; \
			(cd ~man/man$${section}; ../tools/makecat $$i;) ; \
			sendfile root@basset ~man/cat${section}/$$i ; \
		done

view:		$(LISTINGS)
		cat $? | col | ul | more

print:		$(LISTINGS)
		cat $? | col -x | $(PRSPOOL)

clean:
		$(RM) *.[aqsx]

clobber:	clean

llib:

FRC:
