Selaa lähdekoodia

Prettified docs make rules.

Taddeus Kroes 13 vuotta sitten
vanhempi
sitoutus
489abd2507
1 muutettua tiedostoa jossa 9 lisäystä ja 12 poistoa
  1. 9 12
      docs/rules.mk

+ 9 - 12
docs/rules.mk

@@ -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