about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdrien Tétar <adri-from-59@hotmail.fr>2014-03-09 11:21:05 +0100
committerAdrien Tétar <adri-from-59@hotmail.fr>2014-03-09 18:44:59 +0100
commit9eadcacdd76d12c72284ddc122625488f297dea8 (patch)
tree35d369e51b3356807c479395d5ef0800c0ec4775
parent862acedf514fe806d2ab7d337fc0e156faf1d7b4 (diff)
downloadrust-9eadcacdd76d12c72284ddc122625488f297dea8.tar.gz
rust-9eadcacdd76d12c72284ddc122625488f297dea8.zip
doc: have a real switch b/w LaTeX compilers
-rwxr-xr-xconfigure4
-rw-r--r--mk/docs.mk26
2 files changed, 16 insertions, 14 deletions
diff --git a/configure b/configure
index 873ff54722e..f470fd6f26c 100755
--- a/configure
+++ b/configure
@@ -455,8 +455,8 @@ probe CFG_ISCC             iscc
 probe CFG_LLNEXTGEN        LLnextgen
 probe CFG_PANDOC           pandoc
 probe CFG_PDFLATEX         pdflatex
-probe CFG_XETEX            xetex
-probe CFG_LUATEX           luatex
+probe CFG_XELATEX          xelatex
+probe CFG_LUALATEX         lualatex
 probe CFG_GDB              gdb
 if [ "$CFG_OSTYPE" = "unknown-linux-gnu" ]
 then
diff --git a/mk/docs.mk b/mk/docs.mk
index 58a62b47aa0..7a8dfd2d58f 100644
--- a/mk/docs.mk
+++ b/mk/docs.mk
@@ -73,18 +73,20 @@ endif
 # Check for the various external utilities for the EPUB/PDF docs:
 
 ifeq ($(CFG_PDFLATEX),)
-  $(info cfg: no pdflatex found, omitting doc/rust.pdf)
-  NO_PDF_DOCS = 1
-else
-  ifeq ($(CFG_XETEX),)
-    $(info cfg: no xetex found, disabling doc/rust.pdf)
-    NO_PDF_DOCS = 1
+  $(info cfg: no pdflatex 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)
+      NO_PDF_DOCS = 1
+	else
+      CFG_LATEX := $(CFG_LUALATEX)
+    endif
   else
-    ifeq ($(CFG_LUATEX),)
-       $(info cfg: lacking luatex, disabling pdflatex)
-       NO_PDF_DOCS = 1
-	endif
+    CFG_LATEX := $(CFG_XELATEX)
   endif
+else
+  CFG_LATEX := $(CFG_PDFLATEX)
 endif
 
 
@@ -175,8 +177,8 @@ ifneq ($(NO_PDF_DOCS),1)
 ifeq ($$(SHOULD_BUILD_PDF_DOC_$(1)),1)
 DOC_TARGETS += doc/$(1).pdf
 doc/$(1).pdf: doc/$(1).tex
-	@$$(call E, pdflatex: $$@)
-	$$(Q)$$(CFG_PDFLATEX) \
+	@$$(call E, latex compiler: $$@)
+	$$(Q)$$(CFG_LATEX) \
 	-interaction=batchmode \
 	-output-directory=doc \
 	$$<