# strachey100 Makefile

# The postscript viewer
#GV = ghostview
GV = evince

PUB = /homes/mr/public_html

# Public HTML directory if not mountable on this machine
# and the shared drive is called E: (/dose on Linux).
# Remember to call ssh-add before calling make sshpub.
SSHPUB = ely.cl.cam.ac.uk:public_html

src = strachey100.tex strachey100.bib

help:
	@echo
	@echo "make pdf      Make strachey100.pdf"
	@echo "make view     Make strachey100.pdf and view it"
	@echo "make dose     Put strachey100.pdf in my E drive (/dose)"
	@echo "make sshpube  Put strachey100.pdf and strachey.{tgz,zip} in my home page using scp"
	@echo "make clean    Delete all rebuildable files"
	@echo

pub:	strachey100.pdf ${src} Makefile
	cp strachey100.pdf $(src) Makefile pub


pdf:	strachey100.pdf

strachey100.pdf:	$(src)
	date >date.tex
	pdflatex strachey100
	bibtex strachey100
	pdflatex strachey100
	bibtex strachey100
	pdflatex strachey100

view:	strachey100.pdf
	evince strachey100.pdf

dose:	
	cp strachey100.pdf /dose

sshpube:	strachey100.pdf
	(make clean)
	rm -f ../strachey.zip
	(cd ..; tar zcf strachey.tgz strachey)
	(cd ..;  zip -rv9 strachey.zip strachey)
	cp strachey100.pdf ../strachey.tgz ../strachey.zip /dose
	scp strachey100.pdf ../strachey.tgz ../strachey.zip $(SSHPUB)

clean:
	rm -f *~ core date.tex
	rm -f *.log *.dvi *.aux *.blg *.err
	rm -f *.idx *.ilg *.lof
	rm -f *.toc *.bbl






