#
# $RCSfile: Makefile,v $
#
# x-kernel v3.3
#
# Copyright (c) 1996,1993,1991,1990  Arizona Board of Regents
#
# $Log: Makefile,v $
# Revision 1.7  1997/07/02 00:37:19  venkat
# *** empty log message ***
#
# Revision 1.6  1997/07/02  00:36:21  venkat
# revision. venkat 7/1
#
# Revision 1.5  1997/07/02  00:33:45  venkat
# revisions 7/1 venkat
#
# Revision 1.4  1996/06/13 21:33:32  slm
# Added "building xsim" section.
#
# Revision 1.3  1996/02/09  00:18:32  slm
# Fixed typos.
#
# Revision 1.2  1996/02/09  00:13:49  slm
# Fixed typo.
#
# Revision 1.1  1996/02/02  00:20:05  slm
# Initial revision
#

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

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

% :: RCS/%,v

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

SOURCE = xsim

GREP = fgrep -i
#GREP = egrep

SOURCES = $(SOURCE).tex app_convert.tex app_host.tex app_net.tex             \
	  app_router.tex app_set.tex app_trace.tex building.tex example1.tex \
	  example2.tex output.tex overview.tex spec.tex xsim.data.tex        \
	  ans.eps cit.eps graph.eps internet.eps sim.eps userlvl.eps  \
	  ptcp.tex graphdesc2.ps extrace.tex

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

$(SOURCE).dvi: $(SOURCES)
	$(LATEX) $(SOURCE)
	bibtex $(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 *.ps
