DOCNAME = thesis

INPUT = $(DOCNAME).tex
TARGET= $(DOCNAME).pdf

default: $(TARGET)

$(TARGET): $(INPUT) Makefile chapters/*.tex custom_macro.tex mythesis.sty raw/*
	@rm -f $(DOCNAME).{aux,toc,lof,lot}
	pdflatex $< && bibtex $(DOCNAME) && pdflatex $< && pdflatex $<

clean:
	@rm -f *.{aux,toc,lof,lot}
	@rm -f *.{aux,bbl,blg,log,nav,out,snm,toc,lot,lof} $(TARGET)
	@rm -f comment.cut
