#
# $RCSfile: Makefile,v $
#
# x-kernel v3.3
#
# Copyright (c) 1996,1993,1991,1990  Arizona Board of Regents
#
# $Log: Makefile,v $
# Revision 1.2  1996/06/14 23:41:08  slm
# Added *.ind to cleanup files.
#
# Revision 1.1  1996/02/01  23:35:35  slm
# Initial revision
#

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

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

% :: RCS/%,v

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

SOURCE = idmap

GREP = fgrep -i
#GREP = egrep

SOURCES = $(SOURCE).tex

$(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 *.ps
