|
|
@@ -1,20 +1,17 @@
|
|
|
-report=report
|
|
|
+REPORT := report
|
|
|
+PDFLATEX_FLAGS = -halt-on-error -interaction=nonstopmode \
|
|
|
+ -output-directory "../`dirname $@`"
|
|
|
|
|
|
.PHONY: docs
|
|
|
|
|
|
-docs: $(b)proposal.pdf $(b)presentation.pdf $(b)$(report).pdf $(b)$(report).bbl
|
|
|
+docs: $(b)proposal.pdf $(b)presentation.pdf $(b)$(REPORT).pdf $(b)$(REPORT).bbl
|
|
|
|
|
|
$(b)%.pdf: $(d)%.tex
|
|
|
mkdir -p `dirname $@`
|
|
|
- cd $(d); \
|
|
|
- pdflatex -halt-on-error -interaction=nonstopmode \
|
|
|
- -output-directory "../`dirname $@`" `basename $^`
|
|
|
+ cd $(d); pdflatex ${PDFLATEX_FLAGS} `basename $^`
|
|
|
|
|
|
-$(b)$(report).bbl: $(d)$(report).bib
|
|
|
- cp $(d)$(report).bib $(b)$(report).bib
|
|
|
- cd $(b); bibtex8 $(report).aux
|
|
|
+$(b)$(REPORT).bbl: $(d)$(REPORT).bib
|
|
|
+ BIBINPUTS=$(d) bibtex8 ${@:.bbl=.aux}
|
|
|
cd $(d); \
|
|
|
- pdflatex -halt-on-error -interaction=nonstopmode \
|
|
|
- -output-directory "../`dirname $@`" $(report).tex; \
|
|
|
- pdflatex -halt-on-error -interaction=nonstopmode \
|
|
|
- -output-directory "../`dirname $@`" $(report).tex
|
|
|
+ pdflatex ${PDFLATEX_FLAGS} $(REPORT).tex; \
|
|
|
+ pdflatex ${PDFLATEX_FLAGS} $(REPORT).tex
|