SHELL=/bin/bash
PAPER=doku
LITERATURE=literature

TEXCMD=pdflatex
BIBCMD=bibtex

all: ${PAPER}.pdf

# very simple rule to create pdf from tex file
# NOTES: 
#   - you have to run bibtex by yourself
#   - likely to need (several) reruns if labels/references have changed (invoke with make -B)
$(PAPER).pdf: $(PAPER).tex
	$(TEXCMD) $< 

## more sophisticated (but not perfect) rules. Disable the rule from above and enable those
## if you want automatic recompilation
#$(PAPER).pdf: $(PAPER).tex $(PAPER).bbl
#	$(TEXCMD) $<
#
#$(PAPER).bbl: $(PAPER).aux $(LITERATURE).bib
#	$(BIBCMD) $(PAPER)
#	$(TEXCMD) $(PAPER).tex
#
#$(PAPER).aux: $(PAPER).tex
#	$(TEXCMD) $<

.PHONY:clean

clean:
	rm -f *.aux *.log *.bbl *.blg *.toc *.dvi *.ps ${PAPER}.pdf

