From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936019AbcHJT7r (ORCPT ); Wed, 10 Aug 2016 15:59:47 -0400 Received: from mga01.intel.com ([192.55.52.88]:53168 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932691AbcHJSc7 (ORCPT ); Wed, 10 Aug 2016 14:32:59 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,500,1464678000"; d="scan'208";a="1038720100" From: Jani Nikula To: Mauro Carvalho Chehab , "Luis R. Rodriguez" Cc: "jani. nikula" , linux-doc@vger.kernel.org, "linux-kernel@vger.kernel.org" , Mauro Carvalho Chehab , Daniel Vetter , Jonathan Corbet , Markus Heiser Subject: [RFC PATCH 2/3] Documentation: switch to pdflatex for pdf generation Date: Wed, 10 Aug 2016 18:54:08 +0300 Message-Id: <3057f0cf1b84ee0d89da0271c40fade3e1697154.1470844185.git.jani.nikula@intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: <20160810120535.27570309@vela.lan> In-Reply-To: References: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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