From nobody Sun Sep 14 01:41:45 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83C5FEB64DA for ; Tue, 18 Jul 2023 15:15:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233512AbjGRPPz (ORCPT ); Tue, 18 Jul 2023 11:15:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233482AbjGRPPp (ORCPT ); Tue, 18 Jul 2023 11:15:45 -0400 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2042.outbound.protection.outlook.com [40.107.101.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B62EC0; Tue, 18 Jul 2023 08:15:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JTfUOlFpQ3id+NtP59ClJV66knkZ2u9toNoB/1vhnweDRYyW6oOwF7fRBLaJ7ONYVMMICWOPhr8wgGN091QoGLV9yF9E963eRQEOfG041x7HdXgW2wfQAaVsKQ8bvPhLDl6msq5+THBZUvCeF+454xtY4YSefGBAqan3YkGFUjejREsr89zNNqQMbpV7r3KIVYKQR6H5pn/bioY2tyaPaointcLdmmSxlk9bi3IbbpCd1fvYkqEFwKMtYgK/LZ34wIS0WecTU4nWtFiuhTJeLFDNLowDV7SR8qxd4Okw179jh/oh8vjNo+RHmv2CWALKvM6H8zfSQEmpiusNb4iXXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8I/VgGnwsk4aIsKdQgj/IxoUQL+LxGruyY6YLyDbQmc=; b=a2r4Oj/qoKDZpA4GQve/dU97FRjB/Aak6+RFZpVPoH+DeHDJZa1QnNqVl/EkPASInHK+Q25wdHOM4p9wUvXx8MeMshs1/txBaNfhKE3k4zlXvTUERODoqq2TQmJbU2PV1ZqRIli3dwERyqsnrTgYoRsptSitOqJNJenx8S5oFRb+915t8ymyU0hNaCPJP5nVfULP8QsubbvnW2vWC+114t1lZLuu8OhYf1uiUPd04YLL+RhRXZ43ON2/26rTb6bvK1qmEBYJD3RSdIySVf9PkRce8l0U+kfI9OnOVjec54Bwc0SMA/vAylUoxLcpe26xCtd8ios3GCjf1IteuIa5hw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lwn.net smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8I/VgGnwsk4aIsKdQgj/IxoUQL+LxGruyY6YLyDbQmc=; b=ns6/f65IJPhOZg1QP4m/Hp0y2Sn5Guif0PA1RHjsszGJCRaepSG0o0CB1qkY/fbK2MNICW7WZyYW04L0ckSHK+daTQAzYmpIwiJIXgJl9fg63YuHA4OYRzuPAogmoTykRDYsMloQRJUjk3vkNhdM8iP7YPO9tP1jiIJekQHbfH4= Received: from MW4PR03CA0013.namprd03.prod.outlook.com (2603:10b6:303:8f::18) by MW4PR12MB6921.namprd12.prod.outlook.com (2603:10b6:303:208::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.33; Tue, 18 Jul 2023 15:15:41 +0000 Received: from CO1NAM11FT104.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8f:cafe::c7) by MW4PR03CA0013.outlook.office365.com (2603:10b6:303:8f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.33 via Frontend Transport; Tue, 18 Jul 2023 15:15:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT104.mail.protection.outlook.com (10.13.174.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6588.33 via Frontend Transport; Tue, 18 Jul 2023 15:15:40 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 18 Jul 2023 10:15:36 -0500 Received: from iron-maiden.amd.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Tue, 18 Jul 2023 10:15:35 -0500 From: Carlos Bilbao To: , CC: , , , , , , "Carlos Bilbao" , Akira Yokosawa Subject: [PATCH v8 1/2] docs: Move rustdoc output, cross-reference it Date: Tue, 18 Jul 2023 10:15:33 -0500 Message-ID: <20230718151534.4067460-2-carlos.bilbao@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230718151534.4067460-1-carlos.bilbao@amd.com> References: <20230718151534.4067460-1-carlos.bilbao@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT104:EE_|MW4PR12MB6921:EE_ X-MS-Office365-Filtering-Correlation-Id: a2b059c2-0eeb-4e64-5845-08db87a1d915 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o87mJ5HQmlzMdRUGw61aQ5NTrMk4NI6LFyBYAKINOO5Pt/iqj13Hzo3z0gYtCXoSJVZgfKcNZWo1SRugb1g3ZhOfveM0CDkw0M4gdhJs7MY0HHT6BkTU6sxDx41LksmyatPIqtoEKUgHe5fLZbpoyIlCcbJAWpf8BmdigCfrfG1UMQ1Lsc78R7UH6RzFz5fi58WlfEKP3Ti9JP21T2SUQXmUahyYmvDdDfXzdZNuDAOqTxzyVtn336PSIJ18RDde7jouKN0q5wAUEa2kMN4hw2PnJjFEp9mlGZ56xnzCvd8CWOolzr+8oB1DSCjVeqzHr7P/URoJ4+0ResI+SHRVSiK3c5lbQ255LMviR+u8GOilNGgx3k2g5S7bggXr3LpmJgaaBJ+fsVRDBmU0yB3qMjlshuYTZ3rFUL0PvrxljywoSOKTljkI4G7VSS+BG4dDUAXBF3nqjSi48r1ePOff5LeI2WyZ79iaeKxIZ1s5YhnhCvPmggtG7EVNByXe4LduQ707Ur0R2qu4kRv1f8yytQLPjmw59M5alsrFOibbDLYdcYXK8RtaDSCWVeH/EjrO57whu5DncOJorgGMBMQBRv/m5q5pVYP7/bWBchK/ebhPMQeyM+uU/A/EgpX1nqtWxZmBs+t2GkHVk5ljzGilYhQ/9Udtc6lHWEibmpYlQQygPyOD+a4yewZVaN4Pflvc9SWgyhNOjV7oXXqdJvVWJ6zYG73/4KSOBB6T1tT1Io/7B8xdkTIvB93kOp9bdvnCRFziAicnVk4hXCAFPw6cgw== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(376002)(39860400002)(136003)(396003)(346002)(451199021)(82310400008)(40470700004)(36840700001)(46966006)(336012)(478600001)(7696005)(110136005)(54906003)(186003)(1076003)(82740400003)(2906002)(70586007)(26005)(41300700001)(4326008)(316002)(356005)(8676002)(5660300002)(70206006)(8936002)(44832011)(81166007)(86362001)(36756003)(40460700003)(36860700001)(426003)(47076005)(83380400001)(2616005)(40480700001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jul 2023 15:15:40.3033 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a2b059c2-0eeb-4e64-5845-08db87a1d915 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT104.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB6921 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Generate rustdoc documentation with the rest of subsystem's documentation in Documentation/output. Add a cross reference to the generated rustdoc in Documentation/rust/index.rst if Sphinx target rustdoc is set. Reviewed-by: Akira Yokosawa Signed-off-by: Carlos Bilbao Reviewed-by: Martin Rodriguez Reboredo --- Documentation/rust/index.rst | 8 ++++++++ rust/Makefile | 15 +++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Documentation/rust/index.rst b/Documentation/rust/index.rst index 4ae8c66b94fa..e599be2cec9b 100644 --- a/Documentation/rust/index.rst +++ b/Documentation/rust/index.rst @@ -6,6 +6,14 @@ Rust Documentation related to Rust within the kernel. To start using Rust in the kernel, please read the quick-start.rst guide. =20 +.. only:: rustdoc and html + + You can also browse `rustdoc documentation `_. + +.. only:: not rustdoc and html + + This documentation does not include rustdoc generated information. + .. toctree:: :maxdepth: 1 =20 diff --git a/rust/Makefile b/rust/Makefile index 7c9d9f11aec5..dda1aecb8161 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -1,5 +1,8 @@ # SPDX-License-Identifier: GPL-2.0 =20 +# Where to place rustdoc generated documentation +rustdoc_output :=3D $(objtree)/Documentation/output/rust/rustdoc + obj-$(CONFIG_RUST) +=3D core.o compiler_builtins.o always-$(CONFIG_RUST) +=3D exports_core_generated.h =20 @@ -65,7 +68,7 @@ quiet_cmd_rustdoc =3D RUSTDOC $(if $(rustdoc_host),H, ) $< OBJTREE=3D$(abspath $(objtree)) \ $(RUSTDOC) $(if $(rustdoc_host),$(rust_common_flags),$(rust_flags)) \ $(rustc_target_flags) -L$(objtree)/$(obj) \ - --output $(objtree)/$(obj)/doc \ + --output $(rustdoc_output) \ --crate-name $(subst rustdoc-,,$@) \ @$(objtree)/include/generated/rustc_cfg $< =20 @@ -82,15 +85,15 @@ quiet_cmd_rustdoc =3D RUSTDOC $(if $(rustdoc_host),H, )= $< # and then retouch the generated files. rustdoc: rustdoc-core rustdoc-macros rustdoc-compiler_builtins \ rustdoc-alloc rustdoc-kernel - $(Q)cp $(srctree)/Documentation/images/logo.svg $(objtree)/$(obj)/doc - $(Q)cp $(srctree)/Documentation/images/COPYING-logo $(objtree)/$(obj)/doc - $(Q)find $(objtree)/$(obj)/doc -name '*.html' -type f -print0 | xargs -0 = sed -Ei \ + $(Q)cp $(srctree)/Documentation/images/logo.svg $(rustdoc_output) + $(Q)cp $(srctree)/Documentation/images/COPYING-logo $(rustdoc_output) + $(Q)find $(rustdoc_output) -name '*.html' -type f -print0 | xargs -0 sed = -Ei \ -e 's:rust-logo\.svg:logo.svg:g' \ -e 's:rust-logo\.png:logo.svg:g' \ -e 's:favicon\.svg:logo.svg:g' \ -e 's:::g' $(Q)echo '.logo-container > img { object-fit: contain; }' \ - >> $(objtree)/$(obj)/doc/rustdoc.css + >> $(rustdoc_output)/rustdoc.css =20 rustdoc-macros: private rustdoc_host =3D yes rustdoc-macros: private rustc_target_flags =3D --crate-type proc-macro \ @@ -154,7 +157,7 @@ quiet_cmd_rustdoc_test =3D RUSTDOC T $< @$(objtree)/include/generated/rustc_cfg \ $(rustc_target_flags) $(rustdoc_test_target_flags) \ --sysroot $(objtree)/$(obj)/test/sysroot $(rustdoc_test_quiet) \ - -L$(objtree)/$(obj)/test --output $(objtree)/$(obj)/doc \ + -L$(objtree)/$(obj)/test --output $(rustdoc_output) \ --crate-name $(subst rusttest-,,$@) $< =20 # We cannot use `-Zpanic-abort-tests` because some tests are dynamic, --=20 2.34.1 From nobody Sun Sep 14 01:41:45 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13D30C00528 for ; Tue, 18 Jul 2023 15:15:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233486AbjGRPPp (ORCPT ); Tue, 18 Jul 2023 11:15:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231384AbjGRPPn (ORCPT ); Tue, 18 Jul 2023 11:15:43 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2087.outbound.protection.outlook.com [40.107.243.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F313E170C; Tue, 18 Jul 2023 08:15:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U+h8qqLhBhAiAumRPi/1LthlaoPq7Sn7Yib1Dg7HWgC9YIWde7khvNk0l3jLEpIpJvGGARnk4QLw2r8fYbLOksr3d9Xg7pKttGxKua4CGHfneUrGewLMty0MMtowTBDNLoCnMDdYVaWVnyqxXq3UjXshsNyKIYSo1U32Zqb8s8fbMfMMRBaE13kV3Lk5FxRtoUBMIoAZ52YOTmaSdFtEvnMgPNTodrHTWrvpL1XoWorSQvfBTOnTUxHk9beUJtK1dSBhOXAykYgr1UymFANiuZS9wMax4BWS/giUKZUdlqZYk72U8vu+krvj73E7ZIcKjSQMgMlSIkfKefAoxTdigA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=H8rMpB1V6eQ29/v+a8uQ8ImD0gWgEqhzmdnyEnER2mE=; b=mrGc/+vmCXmt3dtPQGF9bJJ2NesKZ5/7y89IIfzuPJCSUz9G/XqX6W3OpKYYk5F/wvb4az6TjiIIC6p7+VGfuXp7NFfkIo73M2p2M9vpVPlX9gpHaUIyCQGrFu/+cQQu7uVPnJPztb97irJ5kGxNXEhXYSyzat/nzDL5JxK2I15l7gp8yvOtWm3C8JB+nDPvltGRB2Q+dUf3ps/ixpJPIRv5TgFFBBoH9/E25emey/qmPHz8M31/dd6aKzSA04MoudAx91Y4vzqpBIv4ldc5ohjyuc1gSiAkJ2b6skHkDzJK9ylIRaToBYaEIkbNZRJ6aioofgoXWECQ1enaplFZSg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lwn.net smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H8rMpB1V6eQ29/v+a8uQ8ImD0gWgEqhzmdnyEnER2mE=; b=lKopU1aZSUNI5MS9Dlec174jfd+Vfe3uIUq2NJyOCRum/qXwL6CQUOm8y3BxavpYcahV4Cx0kY2E+0Uy3+8GK2YmlNrAYRXlBLcY+xvv3BLNmZ9AnkH9aLbwGb8vzSnokeU885KD6GFOHiQKIJHvsz1TIRxxmQP+cDHnG22mKHI= Received: from MW4P222CA0014.NAMP222.PROD.OUTLOOK.COM (2603:10b6:303:114::19) by IA0PR12MB8930.namprd12.prod.outlook.com (2603:10b6:208:481::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.26; Tue, 18 Jul 2023 15:15:38 +0000 Received: from CO1NAM11FT106.eop-nam11.prod.protection.outlook.com (2603:10b6:303:114:cafe::73) by MW4P222CA0014.outlook.office365.com (2603:10b6:303:114::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.33 via Frontend Transport; Tue, 18 Jul 2023 15:15:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by CO1NAM11FT106.mail.protection.outlook.com (10.13.175.44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6588.33 via Frontend Transport; Tue, 18 Jul 2023 15:15:37 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 18 Jul 2023 10:15:37 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 18 Jul 2023 10:15:36 -0500 Received: from iron-maiden.amd.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Tue, 18 Jul 2023 10:15:36 -0500 From: Carlos Bilbao To: , CC: , , , , , , "Carlos Bilbao" , Akira Yokosawa Subject: [PATCH v8 2/2] docs: Integrate rustdoc generation into htmldocs Date: Tue, 18 Jul 2023 10:15:34 -0500 Message-ID: <20230718151534.4067460-3-carlos.bilbao@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230718151534.4067460-1-carlos.bilbao@amd.com> References: <20230718151534.4067460-1-carlos.bilbao@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT106:EE_|IA0PR12MB8930:EE_ X-MS-Office365-Filtering-Correlation-Id: b484d83b-4111-400a-38fc-08db87a1d7aa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cXzMG13AivBd30obCJ9ztmT1oOHuwo2hfvC9OmcT8dTPQVgi7OLwkt4VXGsEe+rSUnNHJnnl5+BQY2TM306httumlC8euUykEYgFptemgLy+m8l6L0V/XvR5MMwW+ootiY84Pd7lK7d5R19elDebGf7tIbrsHwm7jKmNYwtEbxb41EsD/Xt0uoVg1pIj6eFwB1PxuVoFnulCXUAB2/D88dHPigjsK74ZHyyEHmgsZL2Z7LJzsL+w6phXIiq1/Y9MqQJ9MdNZtyZmkGFcWqQ4Ogd8FHDph9FdWC2JFFEc8EewH+vlYgCUeyMxRKo3PMP1xvwRdr/tvCgnXtnYq32IyuWsoNSAMXee/WjhMD3sn3PzmprDRngudSUcC+Ku1gKUs4IzkI5ILUl4Z6540WbhQVSr67+yNn45bNU3iLg8t9bVE+OsWuPGwStr1tKb1j1jgkU7lEsdk3AoM5TgvNIuQjzIXmeLe5iayFHMrQF5uux2qxQMIDANPNuGaNMXYleGeKHPeP4MEjwwPxyJ1UU04ahTdzEVZ014glCvalqQyfxtAvvvKI/h9ItEaMa22ZU4UFNg8qAAjCjEp5+ZdzMdpK2UbubYDPQWrwdkMYcYGq2auJAM40yF48W3ZORVm2z3s8tHa34ykp31oPUQtFzuPctZ3ALnjbHcHq1b75fQqvoyjp/u0u2ApPQ+3sU88P4cTUwRsn2PzgJ2Fr91TnpKmv1CviGRKXKR4AcMG+8u4QYqXTA6GfmcyHZvt4G7V65NI9NBk6OFhSvJTdq+ROTCLQ== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(136003)(396003)(346002)(39860400002)(376002)(451199021)(82310400008)(40470700004)(46966006)(36840700001)(70206006)(70586007)(44832011)(316002)(8676002)(4326008)(8936002)(40460700003)(5660300002)(41300700001)(86362001)(36756003)(2906002)(40480700001)(7696005)(478600001)(426003)(336012)(82740400003)(186003)(26005)(1076003)(2616005)(110136005)(54906003)(36860700001)(356005)(81166007)(47076005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jul 2023 15:15:37.9236 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b484d83b-4111-400a-38fc-08db87a1d7aa X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT106.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB8930 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Change target `make htmldocs` to combine RST Sphinx and the generation of Rust documentation, when support is available and .config exists. Reviewed-by: Akira Yokosawa Signed-off-by: Carlos Bilbao Reviewed-by: Martin Rodriguez Reboredo --- Documentation/Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/Makefile b/Documentation/Makefile index 023fa658a0a8..2f35793acd2a 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -59,6 +59,12 @@ PAPEROPT_letter =3D -D latex_paper_size=3Dletter KERNELDOC =3D $(srctree)/scripts/kernel-doc KERNELDOC_CONF =3D -D kerneldoc_srctree=3D$(srctree) -D kerneldoc_bin=3D$= (KERNELDOC) ALLSPHINXOPTS =3D $(KERNELDOC_CONF) $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) +ifneq ($(wildcard $(srctree)/.config),) +ifeq ($(CONFIG_RUST),y) + # Let Sphinx know we will include rustdoc + ALLSPHINXOPTS +=3D -t rustdoc +endif +endif # the i18n builder cannot share the environment and doctrees with the othe= rs I18NSPHINXOPTS =3D $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . =20 @@ -95,6 +101,16 @@ htmldocs: @$(srctree)/scripts/sphinx-pre-install --version-check @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var))) =20 +# If Rust support is available and .config exists, add rustdoc generated c= ontents. +# If there are any, the errors from this make rustdoc will be displayed but +# won't stop the execution of htmldocs + +ifneq ($(wildcard $(srctree)/.config),) +ifeq ($(CONFIG_RUST),y) + $(Q)$(MAKE) rustdoc || true +endif +endif + texinfodocs: @$(srctree)/scripts/sphinx-pre-install --version-check @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,texinfo,$(var),texin= fo,$(var))) --=20 2.34.1