#
# $RCSfile: Makefile,v $
#
# x-kernel v3.3
#
# Copyright (c) 1996,1993,1991,1990  Arizona Board of Regents
#
# $Log: Makefile,v $
# Revision 1.1  1996/02/02 00:12:13  slm
# Initial revision
#

.SUFFIXES:
.SUFFIXES: .ps .dvi .tex

LATEX = /usr/local/bin/nlatex
PAGES =

% :: RCS/%,v

.dvi.ps:
	/usr/local/bin/dvips -o $@ $<

SOURCE = turorial

GREP = fgrep -i
#GREP = egrep

SOURCES = $(SOURCE).tex event.tex example.tex idmap.tex message.tex           \
	  more_examples.tex oop.tex participant.tex refcount.tex tutorial.tex \
	  upi.tex break.ps bsdpop.ps bsdpush.ps join.ps pop.ps process.ps     \
	  prot_graph.ps push.ps simple_msg.ps upi.ps

$(SOURCE).ps: $(SOURCE).dvi

$(SOURCE).dvi: $(SOURCES)
	$(LATEX) $(SOURCE)
	bibtex $(SOURCE)
	$(LATEX) $(SOURCE)
	$(LATEX) $(SOURCE)

spell: $(SOURCES)
	spell $(SOURCES)

print: $(SOURCE).ps
	lpr -i $(SOURCE).ps

grep: $(SOURCES)
	@-$(GREP) -n -e '$(G)' $(SOURCES) | \
	sed 's/^\([^:]*\):\([^:]*\):/"\1", line \2:/'
	@sleep 1

clean:
	rm -f *.aux *.bak *.bbl *.blg *.ckp *.ilg *.lof *.log *.lot \
	    *.toc *.idx *.ind

allclean: clean
	rm -f *.dvi $(SOURCE).ps
