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 = myphdthesis.tex

help:
	@echo
	@echo "make pdf      Make myphdthesis.pdf and view it"
	@echo "make dose     Put myphdthesis.pdf in my E drive (/dose)"
	@echo "make sshpubd  Put myphdthesis.pdf in /dosd and my home page using scp"
	@echo "make sshpube  Put myphdthesis.pdf in /dose and my home page using scp"
	@echo "make clean    Delete all rebuildable files"
	@echo

pr:	myphdthesis.ps
	lpr myphdthesis.ps
	lpq

prpages:	myphdthesis.ps
	lpr -o page-range=1-5 myphdthesis.ps
	lpq

myphdthesis.dvi:	$(src)
	date >date.tex
	latex myphdthesis
	latex myphdthesis
	latex myphdthesis

myphdthesis.ps:	myphdthesis.dvi
#	dvips -Ppdf -pp 49-54,85-100 -o myphdthesis.ps myphdthesis.dvi
	dvips -Ppdf -pp 0-300 -o myphdthesis.ps myphdthesis.dvi

ps:	myphdthesis.ps

pdf:	myphdthesis.pdf
	okular myphdthesis.pdf

myphdthesis.pdf:	myphdthesis.ps
	ps2pdf myphdthesis.ps myphdthesis.pdf

dvi:	myphdthesis.dvi
	xdvi myphdthesis.dvi

pub:	myphdthesis.pdf
	cp myphdthesis.pdf $(PUB)

dosd:	myphdthesis.pdf
	cp myphdthesis.pdf /dosd

dose:	myphdthesis.pdf
	cp myphdthesis.pdf /dose

sshpubd:	myphdthesis.pdf
	cp myphdthesis.pdf /dosd
	scp myphdthesis.pdf $(SSHPUB)

sshpube:	myphdthesis.pdf
	cp myphdthesis.pdf /dose
	scp myphdthesis.pdf $(SSHPUB)

clean:
	rm -f *~ core
	rm -f *.log *.dvi *.aux *.blg *.err myphdthesis.ps myphdthesis.pdf
	rm -f *.idx *.ilg *.lof
	rm -f *.toc *.bbl


