mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>,
	"Luis R. Rodriguez" <mcgrof@kernel.org>
Cc: "jani. nikula" <jani.nikula@intel.com>,
	linux-doc@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Jonathan Corbet <corbet@lwn.net>,
	Markus Heiser <markus.heiser@darmarit.de>
Subject: [RFC PATCH 2/3] Documentation: switch to pdflatex for pdf generation
Date: Wed, 10 Aug 2016 18:54:08 +0300	[thread overview]
Message-ID: <3057f0cf1b84ee0d89da0271c40fade3e1697154.1470844185.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1470844185.git.jani.nikula@intel.com>
In-Reply-To: <cover.1470844185.git.jani.nikula@intel.com>

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>
---
 Documentation/Makefile.sphinx | 15 ++++++++-------
 1 file 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)
-- 
2.1.4

  parent reply	other threads:[~2016-08-10 19:59 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-10  1:19 Making pdfdocs with sphinx - only select rst targets Luis R. Rodriguez
2016-08-10  8:41 ` Mauro Carvalho Chehab
     [not found]   ` <CAB=NE6UUiKSn66=F+WUrqk3E1tj+fnzqFnD=dX55md6RnaiOgQ@mail.gmail.com>
2016-08-10 15:05     ` Mauro Carvalho Chehab
2016-08-10 15:54       ` [RFC PATCH 0/3] Documentation: switch to pdflatex and fix pdf build Jani Nikula
2016-08-10 15:54         ` [RFC PATCH 1/3] Documentation/sphinx: build the media intermediate rst files for all outputs Jani Nikula
2016-08-10 16:14           ` Mauro Carvalho Chehab
2016-08-10 15:54         ` Jani Nikula [this message]
2016-08-10 17:15           ` [RFC PATCH 2/3] Documentation: switch to pdflatex for pdf generation Markus Heiser
2016-08-10 20:07           ` Luis R. Rodriguez
2016-08-10 15:54         ` [RFC PATCH 3/3] Documentation: exclude media documentation from " Jani Nikula
2016-08-10 16:16           ` Mauro Carvalho Chehab
2016-08-10 16:31             ` Markus Heiser
2016-08-10 20:05           ` Luis R. Rodriguez
2016-08-10 16:27         ` [RFC PATCH 0/3] Documentation: switch to pdflatex and fix pdf build Markus Heiser
2016-08-10 20:09         ` Luis R. Rodriguez
2016-08-12 22:40         ` Jonathan Corbet
2016-08-13 16:00           ` Markus Heiser
2016-08-15  9:40           ` Jani Nikula
2016-08-15 12:17             ` Mauro Carvalho Chehab
2016-08-15 22:26               ` Mauro Carvalho Chehab
2016-08-19 12:54                 ` Jani Nikula
2016-08-19 13:21                   ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3057f0cf1b84ee0d89da0271c40fade3e1697154.1470844185.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=corbet@lwn.net \
    --cc=daniel.vetter@ffwll.ch \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus.heiser@darmarit.de \
    --cc=mcgrof@kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mchehab@osg.samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®