summaryrefslogtreecommitdiff
path: root/Documentation/Makefile.sphinx
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2016-08-10 18:54:08 +0300
committerJonathan Corbet <corbet@lwn.net>2016-08-13 00:25:19 +0300
commitf907ba930780d73e87791c73a4fdc1998e59db75 (patch)
treee40084357387eac1121274edba06c8e5bd7780b1 /Documentation/Makefile.sphinx
parent609afe6b49ef3b4b58886f7b82013a2f35f59a57 (diff)
downloadlinux-f907ba930780d73e87791c73a4fdc1998e59db75.tar.xz
Documentation: switch to pdflatex for pdf generation
Looks like rst2pdf is not robust enough, especially for large documents. Use recursive make on the Sphinx generated makefile to convert latex to pdf. The ugly detail is that pdf is generated into Documentation/output/latex. Unfortunately, the pdflatex build generates huge amounts of build log noise, and also fails in the end. We'll fix that next. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Markus Heiser <markus.heiser@darmarit.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/Makefile.sphinx')
-rw-r--r--Documentation/Makefile.sphinx15
1 files changed, 8 insertions, 7 deletions
diff --git a/Documentation/Makefile.sphinx b/Documentation/Makefile.sphinx
index d24a9f12a280..fc29e08085aa 100644
--- a/Documentation/Makefile.sphinx
+++ b/Documentation/Makefile.sphinx
@@ -25,8 +25,8 @@ else ifneq ($(DOCBOOKS),)
else # HAVE_SPHINX
-# User-friendly check for rst2pdf
-HAVE_RST2PDF := $(shell if python -c "import rst2pdf" >/dev/null 2>&1; then echo 1; else echo 0; fi)
+# User-friendly check for pdflatex
+HAVE_PDFLATEX := $(shell if which pdflatex >/dev/null 2>&1; then echo 1; else echo 0; fi)
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
@@ -44,12 +44,13 @@ htmldocs:
$(call cmd,sphinx,html)
pdfdocs:
-ifeq ($(HAVE_RST2PDF),0)
- $(warning The Python 'rst2pdf' module was not found. Make sure you have the module installed to produce PDF output.)
+ifeq ($(HAVE_PDFLATEX),0)
+ $(warning The 'pdflatex' command was not found. Make sure you have it installed and in PATH to produce PDF output.)
@echo " SKIP Sphinx $@ target."
-else # HAVE_RST2PDF
- $(call cmd,sphinx,pdf)
-endif # HAVE_RST2PDF
+else # HAVE_PDFLATEX
+ $(call cmd,sphinx,latex)
+ $(Q)$(MAKE) -C $(BUILDDIR)/latex
+endif # HAVE_PDFLATEX
epubdocs:
$(call cmd,sphinx,epub)