From patchwork Tue Dec 6 15:31:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Bilbao X-Patchwork-Id: 30384 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2890765wrr; Tue, 6 Dec 2022 07:35:37 -0800 (PST) X-Google-Smtp-Source: AA0mqf4bm8KViCoDi0ASdGrZjO+JVhQY4m8YocE8dQMWIc3zvJCIS/caXChE/RmqDC7058WFKD7R X-Received: by 2002:aa7:d0cc:0:b0:469:d36e:3213 with SMTP id u12-20020aa7d0cc000000b00469d36e3213mr27678545edo.206.1670340937135; Tue, 06 Dec 2022 07:35:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1670340937; cv=pass; d=google.com; s=arc-20160816; b=y7R+LCniJ9n14m9VbNgB9JT0B5UFFc1j8nGPPLYl2cOyFVF2mpEOru12sG2WaTEJgR wGYryEk3y4/CjNuXk74NFDSM08niYqE+rDjlsrJm6FegpfRcMXsgCIJrv3M59JeQAjrf vogCq0vF2V4Y07Y9Ff68AsOGRkuoQnNAx63/6siYONPF/xmydTNAQs/lSu5PP2cSGjDf yAXp1vmwal6CCc9HMkA/h6HY91eR8gXmF/TkaJGpT67bmcifXoKeVy/WMlFDIWFe9yqQ SkF7pAiuFpSorlCMiuwZ7ESwcv0k7uACRZfDPcn1FPfnFevMuSraVVg8la2pVvkfhzmo JnVw== 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=D0ozFJe66DXmXYLYyIKEpSwRsVAAJajiNk3FfCc337s=; b=uaDnqY2FFvZKl2plPb1LfrvAR5J8k9DI6Ww1Uvl2JGrJYGxPEmTowA21gda/uqOAq1 riQC5cO8VGXlNxiIxY37QJJMRDa9nYEvLPHrkNAA2NGeX83nEZqL5XGSv56pd5zwjIEg 6L82Sp7GG5UOFpjvl3OOWc/eDetr3af5xwXjTp5FZszNXJL7TbGzZSz/URfDG7t43g5N 6nkVVtrtF4oNT/cXzuWBiDqMBB5bCUwWsCvZ2zjs8o2v5llO344AwZAQYKrjo3zNextO bdpsxOQDd3P4TqdWpLOvl/IyACeMs5pQqIvTr01kKoulCAH6mOpjsODnCW0wpf+y6Rn5 txmA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=YkFWG1Th; 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 f20-20020a170906c09400b0079b9f472d85si12689589ejz.698.2022.12.06.07.35.13; Tue, 06 Dec 2022 07:35:37 -0800 (PST) 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=YkFWG1Th; 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 S234609AbiLFPcJ (ORCPT + 99 others); Tue, 6 Dec 2022 10:32:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232458AbiLFPcA (ORCPT ); Tue, 6 Dec 2022 10:32:00 -0500 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2066.outbound.protection.outlook.com [40.107.92.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 768CF2980D; Tue, 6 Dec 2022 07:31:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gcqg4aYMzlqKxrXOqk7PcIx/FZaRSf2b2bPGh/mYzKekIgSfwq6LDVS0YXvUlKfPcdAArrsTm59w5xcbh+QUvyIKE02SSWma2W66u0kRnjVyyoSoKP2Cn11PZOlJ8Lfe2NVQoLRMGH8ckxgLNfmqRA8TMr0KOyPH5nOpDVPe4IbX8xeVGXrQbzu+mIFxLWN1s3iKQMImeVjnQd8Ef/YlGmItaL9Qro3k60c2ric6S0F6/sUSBgq7Iy4qK60MEE2N+9dseR6h0k9mmzx++1GCeJAu37RkIbCIIaW/sXN5XkfoY/QFffCyX18pM/lu7MtN3rpLnNs93OvjJO98jUif5A== 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=D0ozFJe66DXmXYLYyIKEpSwRsVAAJajiNk3FfCc337s=; b=YLwWCCarhfZDlXrJZyDuMkRempymgGSS3j7cywFmTqnWqmolI8EG6NkOgjwLkTRteTP6UVV7dJmYNkLyp2CSN9gUoJ/FrGWeQS0UaewKyIalx9mw7gOJQ8D8wZrQv3Cu5Fxy5MIxw32WqIaqcfsxIyChvpFiYSX0MBIChv5o8SoII0TPHqPE7czEnr7sdB8VeyHL4XiRfJ0Jr1vCDzN6/HL3FdQ21MR1LjfKzcCmiefuRdHhQ5TmBZiNi/G4kVClMUMhpuEm/koXIWPJBScEPsrOJfnO1K5hzZ/nRql3pwEDodMGAwWgS9BqQuac/dmooCuFDlVwFtQ1i54XPJXfxA== 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=D0ozFJe66DXmXYLYyIKEpSwRsVAAJajiNk3FfCc337s=; b=YkFWG1Th1Xf2Q+GRbSxkpMne27N8MBRYuFh0k+0oblJXM54oBpUwTNEOIexATP1cyTUh5J+v9YDpfVIZ9VyVgzqmD9kzdblBdrDcJYgeMcsKEDyyykYn/g9fCAsi1f7bPg7EVolwt6pHVR1Z5cEPTnla29zapLN8UN+Q/FM3yek= Received: from DM5PR07CA0076.namprd07.prod.outlook.com (2603:10b6:4:ad::41) by SJ0PR12MB6925.namprd12.prod.outlook.com (2603:10b6:a03:483::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.11; Tue, 6 Dec 2022 15:31:54 +0000 Received: from DM6NAM11FT087.eop-nam11.prod.protection.outlook.com (2603:10b6:4:ad:cafe::ca) by DM5PR07CA0076.outlook.office365.com (2603:10b6:4:ad::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14 via Frontend Transport; Tue, 6 Dec 2022 15:31:54 +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 DM6NAM11FT087.mail.protection.outlook.com (10.13.172.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5901.14 via Frontend Transport; Tue, 6 Dec 2022 15:31:54 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) 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.2375.34; Tue, 6 Dec 2022 09:31:53 -0600 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Tue, 6 Dec 2022 09:31:53 -0600 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.2375.34 via Frontend Transport; Tue, 6 Dec 2022 09:31:52 -0600 From: Carlos Bilbao To: , , CC: , , , , Carlos Bilbao Subject: [PATCH v3 1/2] docs: Move rustdoc output, cross-reference it Date: Tue, 6 Dec 2022 09:31:50 -0600 Message-ID: <20221206153151.771038-2-carlos.bilbao@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221206153151.771038-1-carlos.bilbao@amd.com> References: <20221201204814.2141401-1-carlos.bilbao@amd.com> <20221206153151.771038-1-carlos.bilbao@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT087:EE_|SJ0PR12MB6925:EE_ X-MS-Office365-Filtering-Correlation-Id: 70d78836-500f-45a6-b45c-08dad79f00f7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Zq1zBZZdNH5mWLt7UgCAI9BVIpKL7cwQInyFLAa4ocprq9PG2PhBrCmJC5PdDe3FNeg8r/c7Z48CfmsIsFwEo5MnAKObZwset10WFDLR3ffFg16yfIEF5nn73JJuIMesCd5XAOZc8XsBGCQF8A8d6sX6Z0Ix5n3Tx0vli6FHnJ8ETzWOQGMKylWEMAg+/Fwr4MbvNPSgZqmxaCdMClQB1+G3RMdXFcZ8acyrCivoc44evSCzJaoN1IBSlrEYGxpglOkkb3j5mbFoAoaPYUjYwgZU/x/BLGW7YzXuiOF59axIkOnXWEY2cXo9pAq9S9ODSgz1Jxx6AR16lKXx/cvOYzKI1/y0m6II4lNhAYnJywqZv9rIM2ZLwxvEAB54/Ld/ejWDyc7OFaq55NofvgigGCQg8ZzeD9Kl0aY9QiPU1zo1G0SPFFvJ42I4JM5JaThONle000IDr0LfVCo/KfCRWT2F0E/ewTAUfd8Rzx0mk5FMMqnrnql4nPges4DyWJmk+42YZDAOpqlG+T6+J2SrOtsVRjbOIgND/Zp5dPbw6z7W8ZjC+bQFwcOawy6eotr5Vg6FeVtV2PseVnmIksiZPYyuWr1i/XKofsx+jm94GGltV+wUvSlbnma5U8psUJ6cfjF3XsxZ6TIdiyHsnV39LVoeiW1DrCTLzEfA35wtswSTZjy7WyzYdCdjAtl6vfFSANtQs2Amz25OAe/HMcf9lytnlBkdBM+vIGFODTzrsVc= 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:(13230022)(4636009)(39860400002)(376002)(346002)(136003)(396003)(451199015)(40470700004)(36840700001)(46966006)(70586007)(8936002)(110136005)(36860700001)(81166007)(356005)(82310400005)(316002)(54906003)(82740400003)(41300700001)(86362001)(4326008)(40460700003)(70206006)(8676002)(44832011)(2906002)(36756003)(5660300002)(478600001)(40480700001)(26005)(186003)(7696005)(426003)(47076005)(83380400001)(336012)(2616005)(1076003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2022 15:31:54.1727 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 70d78836-500f-45a6-b45c-08dad79f00f7 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: DM6NAM11FT087.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6925 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751479418289702616?= X-GMAIL-MSGID: =?utf-8?q?1751479418289702616?= 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. Signed-off-by: Carlos Bilbao Reviewed-by: Akira Yokosawa --- Documentation/rust/index.rst | 5 +++++ rust/Makefile | 15 +++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Documentation/rust/index.rst b/Documentation/rust/index.rst index 4ae8c66b94fa..416d6b3de1e4 100644 --- a/Documentation/rust/index.rst +++ b/Documentation/rust/index.rst @@ -6,6 +6,11 @@ Rust Documentation related to Rust within the kernel. To start using Rust in the kernel, please read the quick-start.rst guide. +.. only:: html + + If this documentation includes rustdoc-generated HTML, the entry + point can be found `here `_. + .. toctree:: :maxdepth: 1 diff --git a/rust/Makefile b/rust/Makefile index 7700d3853404..080c07048065 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 + always-$(CONFIG_RUST) += target.json no-clean-files += target.json @@ -58,7 +61,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 $< @@ -75,15 +78,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 \ @@ -141,7 +144,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,