diff options
| author | bors <bors@rust-lang.org> | 2014-09-11 07:15:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-09-11 07:15:46 +0000 |
| commit | 29f817fa22c906b4bb764e43fb6877a6cde3c07f (patch) | |
| tree | 8b70b7785f301dc030fb94db98feae217827fac4 | |
| parent | 1f4117f5182249d91c52cc3e384e4577356e1634 (diff) | |
| parent | 7864243380254fdd93435ef076f78d960f403a82 (diff) | |
auto merge of #17139 : brson/rust/lualatex, r=alexcrichton
Bugs in pdflatex (#12804) are preventing the guide from landing (https://github.com/rust-lang/rust/pull/16657). This solves the immediate problem by changing the build system to prefer lualatex, xelatex to pdflatex (which is apparently obsolete). Because the xelatex on the snapshot bot seems to completely ignore the `-output-directory` option, I also had to frob the makefiles a bit for that case.
| -rw-r--r-- | mk/docs.mk | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/mk/docs.mk b/mk/docs.mk index 8a0c17de27a..db0de4bde5b 100644 --- a/mk/docs.mk +++ b/mk/docs.mk @@ -76,21 +76,22 @@ endif # Check for the various external utilities for the EPUB/PDF docs: -ifeq ($(CFG_PDFLATEX),) - $(info cfg: no pdflatex found, deferring to xelatex) +ifeq ($(CFG_LUALATEX),) + $(info cfg: no lualatex found, deferring to xelatex) ifeq ($(CFG_XELATEX),) - $(info cfg: no xelatex found, deferring to lualatex) - ifeq ($(CFG_LUALATEX),) - $(info cfg: no lualatex found, disabling LaTeX docs) + $(info cfg: no xelatex found, deferring to pdflatex) + ifeq ($(CFG_PDFLATEX),) + $(info cfg: no pdflatex found, disabling LaTeX docs) NO_PDF_DOCS = 1 else - CFG_LATEX := $(CFG_LUALATEX) + CFG_LATEX := $(CFG_PDFLATEX) endif else CFG_LATEX := $(CFG_XELATEX) + XELATEX = 1 endif else - CFG_LATEX := $(CFG_PDFLATEX) + CFG_LATEX := $(CFG_LUALATEX) endif @@ -187,12 +188,25 @@ doc/$(1).tex: $$(D)/$(1).md doc/footer.tex doc/version.tex | doc/ ifneq ($(NO_PDF_DOCS),1) ifeq ($$(SHOULD_BUILD_PDF_DOC_$(1)),1) DOC_TARGETS += doc/$(1).pdf +ifneq ($(XELATEX),1) doc/$(1).pdf: doc/$(1).tex @$$(call E, latex compiler: $$@) $$(Q)$$(CFG_LATEX) \ -interaction=batchmode \ -output-directory=doc \ $$< +else +# The version of xelatex on the snap bots seemingly ingores -output-directory +# So we'll output to . and move to the doc directory manually. +# This will leave some intermediate files in the build directory. +doc/$(1).pdf: doc/$(1).tex + @$$(call E, latex compiler: $$@) + $$(Q)$$(CFG_LATEX) \ + -interaction=batchmode \ + -output-directory=. \ + $$< + $$(Q)mv ./$(1).pdf $$@ +endif # XELATEX endif # SHOULD_BUILD_PDF_DOCS_$(1) endif # NO_PDF_DOCS |
