From patchwork Tue Jul 18 15:15:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Bilbao X-Patchwork-Id: 122091 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp1824667vqt; Tue, 18 Jul 2023 08:22:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlEeW8vtLcWC/3goNe28E2BzFpz8HCAnDcAohwQozAC3PZ6dQ1L+hpQO8QnMyNtgIeCJW3Nb X-Received: by 2002:a17:906:8a42:b0:98e:4b2:2e83 with SMTP id gx2-20020a1709068a4200b0098e04b22e83mr180859ejc.50.1689693751878; Tue, 18 Jul 2023 08:22:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689693751; cv=pass; d=google.com; s=arc-20160816; b=haw7ERxL0mQwI6htrwWki98DY1AIG8vClVMbCFRr0xAM0LfleVXDun9l/P5Bmb7c0L /DeJgId2DNUdMax+bt2m6+bWKTBtPdFrHHNXKSPNAXd5IVibe7i3UJUGmAfM0V3P0BsZ juu1RkRInr36MWFJ+RECjQ0/bn+NAiMyAJU3edqb6FzXp5RYWV1YjscJ310tUOJnHeSV FmSYCP++KGD0EGgtuqexsPBtl0L9k4S+LoHReTYBk/BPG8Kbd8Gq8JiSSpb4jG8xerif L+XOQfX0vIeeL5Fvdr3gQ5RFvoC89d7DjKXcz/b9YPIxGwxC/qY0cJ2spSOee+RAtjff vm2g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8I/VgGnwsk4aIsKdQgj/IxoUQL+LxGruyY6YLyDbQmc=; fh=mr8zbwVLvvD9e+o38BLO0PzuqvsqbBiL1uetGJNYjZo=; b=xfhKxGqUSStcePFt7xxGOd7XFw+ervuEEHXrvAjAdzvYJ5DtT/CFHUcQZ/9evZ2Muy u0csDS/btj3gMZQAA3Bz5lxEZq4KkACI8Nsq9JSU1CG7DShsST0lL+gCkw63BKyH/vx9 +dhalbRacf8V6/rD9NGT/dz0ZOJyAL7UERRGKqUxKZN4sq6ODBv+YRq6EQe1CmsJ81MW jxRHvH48iXiCgfGDeAx1oRDKB4/iob1vvU8DjFSuiGWxsKpUgETkeWmlRQv4dcB09CS1 TYXRYUCAA9qqOk+exzrKvjMtviFFJrn0fPjh6DDUb6bg4hSIDkn8xDKJ8YGMerezQnfp XI1Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="ns6/f65I"; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lh17-20020a170906f8d100b0099301d21540si1333850ejb.859.2023.07.18.08.22.07; Tue, 18 Jul 2023 08:22:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="ns6/f65I"; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233511AbjGRPPx (ORCPT + 99 others); Tue, 18 Jul 2023 11:15:53 -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 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 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771772315795927487 X-GMAIL-MSGID: 1771772315795927487 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. +.. 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 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 +# Where to place rustdoc generated documentation +rustdoc_output := $(objtree)/Documentation/output/rust/rustdoc + obj-$(CONFIG_RUST) += core.o compiler_builtins.o always-$(CONFIG_RUST) += exports_core_generated.h @@ -65,7 +68,7 @@ quiet_cmd_rustdoc = RUSTDOC $(if $(rustdoc_host),H, ) $< OBJTREE=$(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 $< @@ -82,15 +85,15 @@ quiet_cmd_rustdoc = 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 rustdoc-macros: private rustdoc_host = yes rustdoc-macros: private rustc_target_flags = --crate-type proc-macro \ @@ -154,7 +157,7 @@ quiet_cmd_rustdoc_test = 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-,,$@) $< # We cannot use `-Zpanic-abort-tests` because some tests are dynamic, From patchwork Tue Jul 18 15:15:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Bilbao X-Patchwork-Id: 122094 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp1832685vqt; Tue, 18 Jul 2023 08:35:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlFDAejDIsi0j6D/N5IX9hl3wW7HJcW0XWttPn2XE+0+X6pLJo64OtsVw3cwmHV4NT4G9603 X-Received: by 2002:a05:6a20:3d81:b0:133:ee16:567f with SMTP id s1-20020a056a203d8100b00133ee16567fmr13176509pzi.13.1689694533324; Tue, 18 Jul 2023 08:35:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689694533; cv=pass; d=google.com; s=arc-20160816; b=jAreOqAO5Oq9fhL9wO1a5WjgfyDmvj+s73gQ/JyzBUa0EZC81M7Uit0cfBk6CX2F4p LEUPJS/9z3HA+1iofOspp41n//Z/WK5KULz6e4A1xWun/6zQ+jE4oX94o9ye7eznlyRe ZMs6HRQ2JgnqdR2lsBpiDwgKFB1vznti5Qx2i9kPDYT+liW2RTqgLBbUPoOVSwPiCTFB qreMzOSPR2z0PAbo2aX2lfewKDaRqnF4+rLRe1RjtLMfiGXLF5FZ5Yu2VsKNX0gfdV2d KW0NmHuVLH0S767qYltlY1ypZ/6pJX3+/WD9PDU4345TtLI4gSudmOAUveGmmWNoTeCA TUAQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=H8rMpB1V6eQ29/v+a8uQ8ImD0gWgEqhzmdnyEnER2mE=; fh=mr8zbwVLvvD9e+o38BLO0PzuqvsqbBiL1uetGJNYjZo=; b=gehIt5vvBJ3vhCILyDpCmO5VCWJe5dVYfDO9vzPRFjr77aiyxg9PYxnbJqxT9WGU53 jhmNcoRBil47p9/X4xDNk6EwDX7YJ/Jrl+Qdv7cExqDPqLKrD+mtUAOtG/XlVFfor9j2 EaOqGg8rXrIKbYVh8Y3z1UE8crPtcD08G2FK++PSuw/SQa0+SMoy/ZhOTZrIagIjh4lc jsKkofvclBDIUnkFb6uSDiIA98uunQA4CSwh7HA5LQL7PW8DX8SMw6gWnUn9Wb0bErWf XxgCz5WXt/DbSlCOTd4LHG/fx33AjrInmak9buAAx6tG5raAdrUFu70JmOXXg7uHbPbw yWcA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=lKopU1aZ; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 38-20020a631666000000b005572b5c0f1fsi1701705pgw.369.2023.07.18.08.35.20; Tue, 18 Jul 2023 08:35:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=lKopU1aZ; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233285AbjGRPPp (ORCPT + 99 others); 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 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 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771773134790696968 X-GMAIL-MSGID: 1771773134790696968 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 = -D latex_paper_size=letter KERNELDOC = $(srctree)/scripts/kernel-doc KERNELDOC_CONF = -D kerneldoc_srctree=$(srctree) -D kerneldoc_bin=$(KERNELDOC) ALLSPHINXOPTS = $(KERNELDOC_CONF) $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) +ifneq ($(wildcard $(srctree)/.config),) +ifeq ($(CONFIG_RUST),y) + # Let Sphinx know we will include rustdoc + ALLSPHINXOPTS += -t rustdoc +endif +endif # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . @@ -95,6 +101,16 @@ htmldocs: @$(srctree)/scripts/sphinx-pre-install --version-check @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var))) +# If Rust support is available and .config exists, add rustdoc generated contents. +# 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),texinfo,$(var)))