| 123456789101112131415161718192021222324252627 |
- REPORT := report
- DIAGRAM := data/diagram
- PDFLATEX_FLAGS = -halt-on-error -interaction=nonstopmode \
- -output-directory $(@D) -shell-escape
- LATEX = TEXINPUTS=$(d):$(b): pdflatex $(PDFLATEX_FLAGS)
- REF_WARNING := "Rerun to get cross-references right"
- .PHONY: docs report
- docs: report $(b)proposal.pdf $(b)presentation.pdf
- report: $(b)$(REPORT).pdf $(b)$(REPORT).bbl
- $(b)%.pdf: $(d)%.tex
- mkdir -p $(@D)
- $(LATEX) $^
- @while grep $(REF_WARNING) $(@:.pdf=.log) > /dev/null; do \
- echo "** Rerunning pdflatex for cross-references **"; \
- $(LATEX) $^; \
- done
- $(b)$(REPORT).pdf: $(d)$(DIAGRAM).tex
- $(b)$(REPORT).bbl: $(d)$(REPORT).bib
- BIBINPUTS=$(d) bibtex8 ${@:.bbl=.aux}
- $(LATEX) $(d)$(REPORT).tex
- $(LATEX) $(d)$(REPORT).tex
|