Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp2507417ybb; Sat, 30 Mar 2019 06:46:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkGrq5FiHCOUWtwvv6XQaWgOAKFQ5bPWeiSoAax4vikLxq4rxMP2limB5MERhIKyfj25To X-Received: by 2002:a63:54b:: with SMTP id 72mr50916230pgf.323.1553953613741; Sat, 30 Mar 2019 06:46:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553953613; cv=none; d=google.com; s=arc-20160816; b=CJcrLbNewBSx5sBvI6f05P9N15HE14J7LntFR1g2yvmDQzBo77eVsruL8+QGDcqxb2 2cRO2iYPAlh2DSMoXNrLfHSa1mJ4JVkamPy/qdBety9Wl4lTXGGLK8FJOn5l6mQJvD1h huvq82dGinGbuUaG6eLsMKiBD72zGZecz1adnDKjn02xcmKw8UF29IewnlIR1Evnirre EgCDD6SY+F1+V2RnzmZ9tDPiMAKU/PmFZQzHLd5N9Tj0I3xjBzE1n+wFQ8sfOZ5Qc9Cm 0dgXmwPBR5176TAGCjwP/y/Jj/lwyW3xTTJaCrEQsEUKYwAeDqbIeB1E0URwAbJLAk6C dqTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ymGHAe8Xb+yjWOhZHRIj9ejbnXMe6pMmo0/tWfE5DPI=; b=vJLMNl2hOrVEHv9rdhsfefjd9egHTaM9J+4UZYzn6O/eOyYSStlSfsmAtSXRPXSNd7 T1hRzS/H0p05VkDuToHIi4/X5/jQQsZTU6qSFJnG02hmDHYadR+QY3CTS8M1+u8fvo2t nZrMupQWXl4eiU2LBnD2sorsJvGGNwV6/Vi9xkdcQ9nEaBWtcUYVmvfmSIXYv8NoqLX6 DjFlTIR7HDj3qFHsICCNE1dL9X+z94dp7yZBwlQrv9N6/MMjlgWyJ1PLQ+PkLUV3wOqy sJkC6jFW3lfOZ1F2qJ+Hnfl+20VKFDvLikkN+e2wJtIlqDqPyJW8s0USpBRYtrMS5wFH i6Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=foMBxMvV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f21si4444238plr.297.2019.03.30.06.46.38; Sat, 30 Mar 2019 06:46:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=foMBxMvV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730865AbfC3NqE (ORCPT + 99 others); Sat, 30 Mar 2019 09:46:04 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:58784 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730839AbfC3NqE (ORCPT ); Sat, 30 Mar 2019 09:46:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ymGHAe8Xb+yjWOhZHRIj9ejbnXMe6pMmo0/tWfE5DPI=; b=foMBxMvVYX7b90DNeiET/+RuP xeBp1yySYd8YL6X5c8IGeqx7oA8qbxaAWLc6StnwE9meiu/WZG2+ixj2hoRDGolVeu+CqGQhFTxLB b+5GAdQ7WYanWJgtkDyN9AD2NhnQ+bvBW4EL6cVUorZz5KVAR+4m3exF0XqITTYr7TRdlmMoE2yhH yMHwcKvT1gC2f5LvX2OZ6NnsZPIV/MZCJC28DurOnoEBinBOsaoSWBBkwCBx3aHdnM4nucVlpu4Us 0ua5akGXBQ53g3+euT0IBe7/5KeUNowZCeDnam20PeJNo9G/4Ap319TiMM2kFRonf6W1pOfUOokZT oLoRLo89g==; Received: from [179.95.36.211] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hAEJ9-0003vS-OT; Sat, 30 Mar 2019 13:46:03 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92) (envelope-from ) id 1hAEJ6-0007P6-QP; Sat, 30 Mar 2019 10:46:00 -0300 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet Subject: [PATCH 1/2] docs: Makefile: use latexmk if available Date: Sat, 30 Mar 2019 10:45:58 -0300 Message-Id: X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the past, Sphinx was generating a LaTex Makefile that would run xelatex 3 times. Running it multiple times is needed in order to make the indexes right. However, newer versions of it runs it just once, as it expects the machine to use the "latexmk" build, with automatically detects the need for rebuilds. So, add a logic at the Makefile in order to detect if latexmk is installed. If so, it will call it. As an additional bonus, the output of latexmk is a little bit better, making easier to identify build problems. Signed-off-by: Mauro Carvalho Chehab --- Documentation/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index 9786957c6a35..e889e7cb8511 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -28,8 +28,13 @@ ifeq ($(HAVE_SPHINX),0) else # HAVE_SPHINX -# User-friendly check for pdflatex +# User-friendly check for pdflatex and latexmk HAVE_PDFLATEX := $(shell if which $(PDFLATEX) >/dev/null 2>&1; then echo 1; else echo 0; fi) +HAVE_LATEXMK := $(shell if which latexmk >/dev/null 2>&1; then echo 1; else echo 0; fi) + +ifeq ($(HAVE_LATEXMK),1) + PDFLATEX := latexmk -$(PDFLATEX) +endif #HAVE_LATEXMK # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 @@ -82,7 +87,7 @@ pdfdocs: else # HAVE_PDFLATEX pdfdocs: latexdocs - $(foreach var,$(SPHINXDIRS), $(MAKE) PDFLATEX=$(PDFLATEX) LATEXOPTS="$(LATEXOPTS)" -C $(BUILDDIR)/$(var)/latex || exit;) + $(foreach var,$(SPHINXDIRS), $(MAKE) PDFLATEX="$(PDFLATEX)" LATEXOPTS="$(LATEXOPTS)" -C $(BUILDDIR)/$(var)/latex || exit;) endif # HAVE_PDFLATEX -- 2.20.1