easytut.ps : easytut.tex recursion.latex
	TEXINPUTS=.:../texinputs: ../tools/mkdvi.sh easytut
	dvips -o easytut.ps easytut.dvi

easytut/index.html : easytut.tex Makefile
	TEXINPUTS=.:../texinputs: latex2html -split 3 -local_icons -address 'Josh Cogliati <a href="mailto:jjc@honors.montana.edu">jjc@honors.montana.edu</a> Wikibooks Version: <a href="http://wikibooks.org/wiki/User:Jrincayc/Contents">Wikibooks Non-programmers Python Tutorial Contents</a>' easytut.tex

easytut.pdf : easytut.ps
	ps2pdf easytut.ps easytut.pdf

easytut.zip : easytut/index.html
	zip -9 easytut.zip easytut/*

easytut_book.pdf : easytut.ps page_count ps2book
	./ps2book easytut

EXERCISES = exercise_examples/boolean.py exercise_examples/decisions1.py exercise_examples/decisions2.py exercise_examples/decisions3.py exercise_examples/functions.py exercise_examples/hello1.py exercise_examples/hello2.py exercise_examples/lists.py exercise_examples/modules.py exercise_examples/who_goes.py exercise_examples/file_io.py

exercise_examples.tar.gz : $(EXERCISES)
	tar -cvzf exercise_examples.tar.gz $(EXERCISES)

exercise_examples.zip : $(EXERCISES)
	zip exercise_examples.zip $(EXERCISES)



easytut.tar.gz : easytut/index.html easytut.ps easytut.tex easytut.pdf easytut.zip easytut_book.pdf exercise_examples.tar.gz exercise_examples.zip
	cp easytut.tex backup/easytut.tex-`date +%Y-%b-%d-%T`
	tar -cvzf easytut.tar.gz easytut.tex easytut.ps Makefile easytut/* easytut.pdf easytut.zip easytut.dvi easytut_book.pdf ps2book page_count exercise_examples.tar.gz exercise_examples.zip *.fig *.epic easytut_es/* non-programmers_italian.html easytut_it/* easytut_gr/* easytut-it/* Easytut_Russian/*

install: easytut.tar.gz
	scp easytut.tar.gz rupert:~jjc/WWW/easytut/
	ssh rupert '(cd ~jjc/WWW/easytut/ && tar -xvzf easytut.tar.gz && ./make_index > index.html)'