LATEXARGS=--interaction=nonstopmode IMGDIR=img-dense IMGPDF=$(foreach D,$(IMGDIR),$(wildcard $(D)/*.pdf)) IMGEPS=$(addsuffix .eps,$(basename $(IMGPDF))) CHAPSRC=$(wildcard chap-*.tex) CHAPPDF=$(addsuffix .pdf,$(basename $(CHAPSRC))) APPSRC=$(wildcard app-*.tex) APPPDF=$(addsuffix .pdf,$(basename $(APPSRC))) TGTS=summary.html thesis.pdf $(CHAPPDF) $(APPPDF) bib.pdf all: $(TGTS) eps-images: $(IMGEPS) clean-eps-images: rm -f $(IMGEPS) summary.html: thesis.tex indextmpl.html gen-htmlindex ./gen-htmlindex $< > $@ thesis.pdf thesis.aux thesis.bbl thesis.toc: thesis.tex thesisdefs.sty pdflatex $(LATEXARGS) $(basename $<) pdflatex $(LATEXARGS) $(basename $<) bibtex $(basename $<) pdflatex $(LATEXARGS) $(basename $<) pdflatex $(LATEXARGS) $(basename $<) $(CHAPPDF) $(APPPDF) bib.pdf: %.pdf: %.tex mkdir $(basename $<) cd $(basename $<) && cp ../thesis.bbl ../thesis.aux ../thesis.toc . cd $(basename $<) && env TEXINPUTS=..//: pdflatex $(LATEXARGS) "\\def\\incparts{$(basename $<)}" "\\input thesis" cp $(basename $<)/thesis.pdf $@ rm -r $(basename $<) $(CHAPPDF) $(APPPDF) bib.pdf: thesis.bbl %.eps: %.pdf pdftops -eps $< $@ clean: rm -f *.aux *.pdfsync *.nlo *.nls *.bbl *.blg *.brf *.fot *.glo *.gls *.idx *.ilg *.ind *.lof *.log *.lot *.out *.toc *.url cleanall: clean rm -f $(CHAPPDF) thesis.pdf thesis.dvi thesis.ps .PHONY: push push: $(TGTS) rsync -avz --progress --include='*.pdf' --exclude-from=.gitignore --exclude=.git/ ./ login:public_html/thesisstuff/ rsync -avz --progress --exclude='*.idx' .git/ login:public_html/thesisstuff/.git/ rsync -avz --progress .git/ login:public_html/thesisstuff/.git/ rsync --delete -avz --progress .git/ login:public_html/thesisstuff/.git/