ソースを参照

Prettified docs make rules even more...

Taddeus Kroes 13 年 前
コミット
d658e5b980
1 ファイル変更7 行追加7 行削除
  1. 7 7
      docs/rules.mk

+ 7 - 7
docs/rules.mk

@@ -1,17 +1,17 @@
 REPORT := report
 PDFLATEX_FLAGS = -halt-on-error -interaction=nonstopmode \
-	-output-directory "../`dirname $@`"
+	-output-directory $(@D)
 
 .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)%.pdf: $(d)%.tex
 	mkdir -p `dirname $@`
-	cd $(d); pdflatex ${PDFLATEX_FLAGS} `basename $^`
+	TEXINPUTS=$(d): pdflatex ${PDFLATEX_FLAGS} $^
 
-$(b)$(REPORT).bbl: $(d)$(REPORT).bib
+$(b)$(REPORT).bbl: $(d)$(REPORT).tex $(d)$(REPORT).bib
+	pdflatex ${PDFLATEX_FLAGS} $(d)$(REPORT).tex
 	BIBINPUTS=$(d) bibtex8 ${@:.bbl=.aux}
-	cd $(d); \
-	pdflatex ${PDFLATEX_FLAGS} $(REPORT).tex; \
-	pdflatex ${PDFLATEX_FLAGS} $(REPORT).tex
+	pdflatex ${PDFLATEX_FLAGS} $(d)$(REPORT).tex
+	pdflatex ${PDFLATEX_FLAGS} $(d)$(REPORT).tex