.PHONY:watch
PAPER=acm_template

all: $(PAPER).pdf

%.pdf: %.tex 
	pdflatex $<
	bibtex $*||true
	pdflatex $<
	pdflatex $<

watch:
	while true; do \
		inotifywait -qr -e modify -e create -e delete -e move ./; \
		make $(PAPER).pdf; \
	done


clean:
	rm -f *.aux *.log *.out *.bbl *.blg *.dvi
