LATEX = latex

DVIPS = dvips

%.dvi: %.tex
	$(LATEX) $<

%.ps: %.dvi
	$(DVIPS) -o $@ $<

%.pdf: %.ps
	ps2pdf $@

all:	top.tex
	latex top
	makeindex top
	latex top
	dvips -T 6.75in,9.25in -Ppdf -o thinkCSpy.ps top
	ps2pdf -dMaxSubsetPct=100 -dCompatibilityLevel=1.2 -dSubsetFonts=true -dEmbedAllFonts=true thinkCSpy.ps


dist: 
	cp Makefile *.tex thinkCSpy
	cp -r illustrations thinkCSpy
	rm thinkCSpy/illustrations/*.bak
	cd thinkCSpy; make clean
	tar -czf thinkCSpy.tar.gz thinkCSpy

clean:
	rm -f *~ *.aux *.log *.dvi *.idx *.ilg *.ind *.toc





