From nobody Thu Oct 2 13:07:16 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF98F2FBDE8; Wed, 17 Sep 2025 12:15:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758111358; cv=none; b=dreLXmktjuCZ+7ZslDe3hXcXN4UfYst6tp07N+k20ABKDad7KNg1sNVBaIqJvxNuAhzShHqV1p2CMA9AF2F7B7G9OdFhzcCsSgzGB/4PnlRr7gSP9XUIvzQt7j4wuAkh4WhWMA2jvyBADN8t0mNOsv+kGhb2/1TM6LHXvnDYl20= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758111358; c=relaxed/simple; bh=PUUaTyw8rlc0Hc2z+x0BdPRC+RKe/Sri73mjZjht+w8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=buHOeact7041/VkGo4Cwv/+/NB/OBbaTue8XGMD5EY0US7KRZCB5iDhdY4EYn8dzvNSIFg8o1Cp1vf/ikONCgZkSlqFaB5oD/d+XQAwFGgOkK5Xcm/PqpuURb1aYFpA3oH1vosPuR4V2CM+D/GYezFLRADyzCtbOaNP0vFRdVQU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aQFj/nqS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aQFj/nqS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6BBEDC4CEF5; Wed, 17 Sep 2025 12:15:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1758111358; bh=PUUaTyw8rlc0Hc2z+x0BdPRC+RKe/Sri73mjZjht+w8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aQFj/nqSwFzfj++u4XcOZwP5aN8k6g6yaU9dLkvDKnoAq204Qy5szO+u/j+Nn1fzo njTPyCogL1XTpEPZxKn0q3GeNmSc0t2mGtFzfYLb0qCxBTshOzQOS0h1vAMF3kpqGI D+YKuq8Iq/p41aLdmkDd342nP1ceAZ63bwK9fwmEb+DJPc0nhThiKlj/Mz/8maLgqZ CsYC8iwp/8WcRC4/3DJki7c9ez3EcGKraK7aO/hYtsbsv/BYYRzCIGkysQwuACXfbb m5n+lJcqN6jobKmnYZMe84PAbBqPFjk/NGBpsK7Jxu6qAHqV0ybJlUfkGqWLK6jfJx ns26zxHzece1g== Received: from mchehab by mail.kernel.org with local (Exim 4.98.2) (envelope-from ) id 1uyr4h-0000000CGe8-1qN7; Wed, 17 Sep 2025 14:15:51 +0200 From: Mauro Carvalho Chehab To: Jonathan Corbet , Linux Doc Mailing List Cc: Mauro Carvalho Chehab , "Akira Yokosawa" , "Mauro Carvalho Chehab" , linux-kernel@vger.kernel.org Subject: [PATCH v7 15/24] tools/docs: sphinx-build-wrapper: add an argument for LaTeX interactive mode Date: Wed, 17 Sep 2025 14:15:09 +0200 Message-ID: <48d17b80c88d5f54ed63713fa2410f75ef15bc58.1758111077.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" By default, we use LaTeX batch mode to build docs. This way, when an error happens, the build fails. This is good for normal builds, but when debugging problems with pdf generation, the best is to use interactive mode. We already support it via LATEXOPTS, but having a command line argument makes it easier: Interactive mode: ./scripts/sphinx-build-wrapper pdfdocs --sphinxdirs peci -v -i ... Running 'xelatex --no-pdf -no-pdf -recorder ".../Documentation/output/pe= ci/latex/peci.tex"' ... Default batch mode: ./scripts/sphinx-build-wrapper pdfdocs --sphinxdirs peci -v ... Running 'xelatex --no-pdf -no-pdf -interaction=3Dbatchmode -no-shell-esca= pe -recorder ".../Documentation/output/peci/latex/peci.tex"' ... Signed-off-by: Mauro Carvalho Chehab --- tools/docs/sphinx-build-wrapper | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/docs/sphinx-build-wrapper b/tools/docs/sphinx-build-wrap= per index c57c732b879c..50761f125bc9 100755 --- a/tools/docs/sphinx-build-wrapper +++ b/tools/docs/sphinx-build-wrapper @@ -173,7 +173,7 @@ class SphinxBuilder: if not verbose: self.sphinxopts +=3D ["-q"] =20 - def __init__(self, builddir, verbose=3DFalse, n_jobs=3DNone): + def __init__(self, builddir, verbose=3DFalse, n_jobs=3DNone, interacti= ve=3DNone): """Initialize internal variables""" self.verbose =3D None =20 @@ -183,7 +183,11 @@ class SphinxBuilder: self.kernelversion =3D os.environ.get("KERNELVERSION", "unknown") self.kernelrelease =3D os.environ.get("KERNELRELEASE", "unknown") self.pdflatex =3D os.environ.get("PDFLATEX", "xelatex") - self.latexopts =3D os.environ.get("LATEXOPTS", "-interaction=3Dbat= chmode -no-shell-escape") + + if not interactive: + self.latexopts =3D os.environ.get("LATEXOPTS", "-interaction= =3Dbatchmode -no-shell-escape") + else: + self.latexopts =3D os.environ.get("LATEXOPTS", "") =20 if not verbose: verbose =3D bool(os.environ.get("KBUILD_VERBOSE", "") !=3D "") @@ -584,12 +588,16 @@ def main(): parser.add_argument('-j', '--jobs', type=3Djobs_type, help=3D"Sets number of jobs to use with sphinx-bui= ld") =20 + parser.add_argument('-i', '--interactive', action=3D'store_true', + help=3D"Change latex default to run in interactive= mode") + args =3D parser.parse_args() =20 PythonVersion.check_python(MIN_PYTHON_VERSION) =20 builder =3D SphinxBuilder(builddir=3Dargs.builddir, - verbose=3Dargs.verbose, n_jobs=3Dargs.jobs) + verbose=3Dargs.verbose, n_jobs=3Dargs.jobs, + interactive=3Dargs.interactive) =20 builder.build(args.target, sphinxdirs=3Dargs.sphinxdirs, conf=3Dargs.c= onf, theme=3Dargs.theme, css=3Dargs.css, paper=3Dargs.paper, --=20 2.51.0