From patchwork Mon Jul 17 15:16:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Bilbao X-Patchwork-Id: 121411 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp1182929vqt; Mon, 17 Jul 2023 08:30:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlFUay4scmg6wCUCgI+IH0Z0TIR6QNzvnig+5yy6XWlbREp7ryz00Hxr/Qm5pWPUQ33H0ZRK X-Received: by 2002:a05:6402:5145:b0:51e:24e1:c0e9 with SMTP id n5-20020a056402514500b0051e24e1c0e9mr12280288edd.10.1689607851666; Mon, 17 Jul 2023 08:30:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689607851; cv=pass; d=google.com; s=arc-20160816; b=Mj9EnedMIVvHA6/XhRFEfQnzBxMnLtTuduWY5B3MRVOG+uhZERk+PTYSxPOrz5XJLo fNSa/AyFzWjQk1kmIw00LfAs8mB1cq/DZjA23stuA571fdZgx59x/QorwdMzw2kf01+J 5/Y031+culBa1+qSgkPXAK58WFYRgy+ykl+1Z2qsSs3dcBh5VE85CJebjJ7VPYraJ+Wx BofFfg/n3giHeJ4eTxUNoztH1vVmCdF2aJFD2VpI7+hG6Pu4Djv6Od4KCEbo4fryF84g 3wBkr5QvZ0T9W2jJwH1NyTFwW5M8hFtD/UvPPBRFFmu2hODpQXAdCpctYNO8pjnMkmgj W15Q== 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=ouJE4lQsQSp8Q53IctGDqr3oacP/jSEf0ga1NP1BMe4=; fh=A++wXte4LJwraEprjp6pOwVBdm4755KqlDgYhx2FY1Q=; b=HPu9o2zPr9/zOqAfIpvA4B8ea/nmwhRQKmvJHaJelInDtYOxohBFogor9iqLMTI7sa 3nTFD1ipYshy8Xf3GmS3N8rAvcuANiweIGp+fHNu7qyrIzbyBkt5O3qLoG6ewImJr6A6 RZ1NloiqYV2XJjjGEm3Ih1gxGyQ4DNtQatu1kdO0y0B7XIbSDsAjj0hXUiomcU2uvCqV bm0DjR68pXh5OIIBg8MgyaXax3WTM5WDWk9BMrdn5GtxF2FVM7CXnqXTSul+YVVgiXnQ KTAxf71gpg6HwMAuvr+f55UoqYdNeqR/7lItGotRFd7Tn0Akcz1PBYKWNpa6rMDJ2qko BYbw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=fEa4caau; 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 d12-20020aa7c1cc000000b0051e26731172si13989930edp.672.2023.07.17.08.30.26; Mon, 17 Jul 2023 08:30:51 -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=fEa4caau; 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 S231261AbjGQPQs (ORCPT + 99 others); Mon, 17 Jul 2023 11:16:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbjGQPQr (ORCPT ); Mon, 17 Jul 2023 11:16:47 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2050.outbound.protection.outlook.com [40.107.92.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58FF7F9; Mon, 17 Jul 2023 08:16:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M7qv6ea+IIjuqXKZhOwhYMEkhpXST0MSkaQ1HM7Tmp81q1k1cax3Aeb4HtdXbn8dkyKqfOy9IbDz/pcVR5sawBKSDteL/k9l95Ag8plaN68BWhP7+M95ifM0B55ctfyt6Od3w+khNNc+F3vIrnRJGgnzxU8I1NDAVUzOMuYcA1nHq/SX8DaojIxtXil1gUXji2WxW/a7bms31iiGoV6pwjILxHU6xuMULqsf/H2st8XtE4y2qd1a4w+pxcsSFIa039liITKj9rsYA8a58GXw09nN/18i+/WrwkP/IL1ZpRzRZYHjJ1U3KNFl5vNodcjMfliq5pVbFVxXJNkxKh0SYw== 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=ouJE4lQsQSp8Q53IctGDqr3oacP/jSEf0ga1NP1BMe4=; b=imLpigCv62/Ob0O8pv1r+pFVmejSNReCrZzsgi/MecBdkJiHcpS/+hcq+1S1rGc7k/cpZ2ZEaYsLvidFzmEhT7nKDsb9Cm5hRC8WtQ4ApisXkSxx57T7WpPLTNh6aLjVCZLbQVQbmYjJLR2mXIFX0p3oa3UKHenjrG0Ev9itCuVXAwE0dbX2vZwD7J4NzUbt9OqtDLIYb4MQ9F/0xrDcUKGaMaRMetilTGUwFHA6jlJDLcnkN3mtkjNKjIb6xmK7ylcf9EVGb6y/QtCc37XiKscegb+xwwTya+1nEUkq1vQtJhNbdUhUAgUyHiI77OuLhyV4AmXjmlEM0guHwrQ7+A== 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=ouJE4lQsQSp8Q53IctGDqr3oacP/jSEf0ga1NP1BMe4=; b=fEa4caauXBlOPfpQfZ3tMTcpEdkCUi3TSk7WLTcbhcK4eakaofsB8xl8ulPGqIfdrjTq6g3ONuZbhhM0uOojh0nm7e/hDb14605BBVSPWM98tZ0I7hvXjPWLeIQOEiLw08lVmSbu+BYwnDk8p9cZ588eWnPyQL6yEszY/siJH5Y= Received: from MW2PR2101CA0021.namprd21.prod.outlook.com (2603:10b6:302:1::34) by CH2PR12MB4892.namprd12.prod.outlook.com (2603:10b6:610:65::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.31; Mon, 17 Jul 2023 15:16:43 +0000 Received: from CO1NAM11FT033.eop-nam11.prod.protection.outlook.com (2603:10b6:302:1:cafe::43) by MW2PR2101CA0021.outlook.office365.com (2603:10b6:302:1::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.8 via Frontend Transport; Mon, 17 Jul 2023 15:16:43 +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 CO1NAM11FT033.mail.protection.outlook.com (10.13.174.247) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6588.32 via Frontend Transport; Mon, 17 Jul 2023 15:16:43 +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.2507.23; Mon, 17 Jul 2023 10:16:33 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) 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.2507.23; Mon, 17 Jul 2023 10:16:32 -0500 Received: from iron-maiden.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Mon, 17 Jul 2023 10:16:32 -0500 From: Carlos Bilbao To: , CC: , , , , , Carlos Bilbao , Akira Yokosawa Subject: [PATCH v7 1/2] docs: Move rustdoc output, cross-reference it Date: Mon, 17 Jul 2023 10:16:23 -0500 Message-ID: <20230717151624.3470714-2-carlos.bilbao@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230717151624.3470714-1-carlos.bilbao@amd.com> References: <20230717151624.3470714-1-carlos.bilbao@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT033:EE_|CH2PR12MB4892:EE_ X-MS-Office365-Filtering-Correlation-Id: b796c906-5278-4a29-e17a-08db86d8d432 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mkhqHy1pAX5nYDeDIpD+GFCcda6E0mzlGc2p77+py6QJ4wPsCHECPZWVqboAAs8eT/MLVEyOF4o7KE5WcVP6C/NTNId4RuGvwCVwmilIQjIZjQITPndyFm8A9E9+DXzcvnx1oxh6XKJv9o2B3IuD66TB8PdJ85u3qt/tLf/GdSP1Hd9ENtbGhAKyRM2gX5uwEC7TZuxAJhngktik0C5vA+7QNKJZ/YVNexSPHcxa/+vctBtb/5uWTs8ZhdcxhPjP2xT7Gk3mLOItfs9p7KpX2ed9z+YOIeJDx86ViK0tL8HOdAMPD8CtVX3VIuXBe8rSkZ8zEmHYsZxCpjXdR4+qFn3otfaf/TeMPWdJYna+ZZi3mhcJWZdB3WxYToVY3NerkIKnPVP0Evk4MPcgGP+zIhHsvAQIUvt42sb1h60Djt8Yg6DpAYEMJqK2vVtuYiLCeV5UIpZri+wCc4GO8YTPAPPjn4c/CpUtdjsLkXtKsSkyeTIom/gNtCbtu676suvjCGjoXM4YPaCUWkixO9uPCgKbuEaqMmZbhXzA8x/zBlOeuOtXBbsPuBd3XVwIMv4oQMvrJiY1HnomT2i/fXwilBmGtypJeANsJae7N8WBtK7iOXqq49aURbVgPFnlTPDQdnyV7CGxFRqtVCTYTT2FdGA7TxDOEeHuDsz/4nZQn7cZAnUiZGCzjmPzOIcYlA4VgJx+M/Lp5Jwt6Uho7xaqQushM30U7qcFrS2xyXvqG2Zr1WLugcZS/8LF/FSKgzHB+yjmPSzlk/rpp4Ooh/t9pQ== 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)(396003)(136003)(39860400002)(346002)(376002)(451199021)(82310400008)(46966006)(36840700001)(40470700004)(110136005)(478600001)(7696005)(6666004)(54906003)(1076003)(336012)(186003)(26005)(70586007)(2906002)(44832011)(41300700001)(70206006)(4326008)(316002)(5660300002)(36756003)(8936002)(8676002)(356005)(81166007)(82740400003)(40460700003)(86362001)(426003)(36860700001)(2616005)(47076005)(83380400001)(40480700001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2023 15:16:43.2657 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b796c906-5278-4a29-e17a-08db86d8d432 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: CO1NAM11FT033.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4892 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_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE 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: 1771682242892615982 X-GMAIL-MSGID: 1771682242892615982 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 --- 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..3d502818e5d4 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 Mon Jul 17 15:16:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Bilbao X-Patchwork-Id: 121419 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp1186593vqt; Mon, 17 Jul 2023 08:36:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlF6KFIs/fJIl00us1fLLWQvVC3Xxum+el7WmDn/vq4N11CWPQjBpcFn1d3i6Q/wIHqQFQTx X-Received: by 2002:a05:6830:14f:b0:6b9:1917:b4af with SMTP id j15-20020a056830014f00b006b91917b4afmr11190292otp.33.1689608215606; Mon, 17 Jul 2023 08:36:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689608215; cv=pass; d=google.com; s=arc-20160816; b=hbearEiH8AcwPHqqj8CSvPgMjpz7rvfPChXfxOO+0DpRR3OPdzZK8TrR3uC38b3eWj K+8VAsUnkWcb7K7iDR73LO5gdq0TSV4xVDLPzHBOhtvM/PCdgS5B1U1PicKxwHwNY+8y KL4j4C4AWG3pEuO+IphhWNB5zuDocAAARckfmM3oyNT1f7dKrvAk24eXVXSGE2nMvMEW yDrbsE/sHrZkGgdfruuQl6ATmnmHBBdCHc+HPChXQLLEkE+E9EjDSLGqCYsdceGomnJ4 IvFubAw51TnLnxj5NDZMYGdea6E0eY3UCcQgrObUe6ppblx2gtBQeQgUgcZsjaMKNMIR kUQg== 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=fdJeC2kWIZIZdeObkmzMk7lTUT798Y0jJoEjwbupOSE=; fh=A++wXte4LJwraEprjp6pOwVBdm4755KqlDgYhx2FY1Q=; b=ulpM8WbD4hxwsrQeD8CTZPZfx76WCpktT/Q2VMhdi+785S56t3ivPDWLsdXsHebpHz +kPky6PLZrgjehYtdzim44NfXEUW/qBpHCrb2kEc0016lwhewiAhiA48hlgd9B5v577r hbDjvpzYqYtSTuL7kGn+vJYRK+D546L7HqGn8+l/xaOwTFcxsx02NCp0r7Z46frvhdW/ HyG8Bt0vqF1j5eDdT2HlbbIx8O2iDkrwGDh1OkN3StwMoYmPA5jpAodPHZO1Nbri26nQ nXYl89E8vvPlNzDA5DbKhXq5bMuTPllmSRJQZC9LYod/U/sC+pEnnKbnl4dobobDiocV Y6cg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=4PiaADqg; 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 l64-20020a638843000000b0055c85062a70si8182486pgd.307.2023.07.17.08.36.41; Mon, 17 Jul 2023 08:36:55 -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=4PiaADqg; 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 S231328AbjGQPR2 (ORCPT + 99 others); Mon, 17 Jul 2023 11:17:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231239AbjGQPRZ (ORCPT ); Mon, 17 Jul 2023 11:17:25 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2085.outbound.protection.outlook.com [40.107.237.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38130D2; Mon, 17 Jul 2023 08:17:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dhRiGvI3XDBh7ZCGJThleXgXiEtKHKGKsKkz7TKBBFT4DdTKgWYyaEt319XfWlNnBKxyCjWVYzTvHGHXo5e1jXjEjTIWhqNmlQcmu+hgsQrPjv/V0+LfsdqwDxPRvtJhKVedZ1W2cfZIeRQxTwhWllg43xgVoqO2EizGMS7smrO9uwvZusXZkuW2SSwVv59Iv04jbpjzTTk3/H++IQYgXxXUXv7gEezfKLb35kbtD0Vr2zufbH63G7F8YcQoqCBiZhW5KLOoAycjvbIOVIzCNQ0pgTC1WMie1qpcuiDZoa8ZpFUv+kCDSqsUpeA1vWA+XOEx4JFmtgaVV8WzSlwY1g== 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=fdJeC2kWIZIZdeObkmzMk7lTUT798Y0jJoEjwbupOSE=; b=ckd0DBLU87Bw/4HBUWwN/XYSaHvG+OSHkNXAnAPCk6n6xm+5GWR3yhtAXRulTeGQ89/wZVUxPCI58ffY0ZN/PEfDWBrMCmmEA4lh/rnE61Y+UJZEpNCBToELOqdU7fner4v1AJyuLzsSIF3DfinNJOgpVP6O/+h8vAKMK4aeH2+2Bn9hAg9gNg+6woczxMfgTkeVKwULSJKi98J7acVbniDNnepOCxYdC8Id0oZuu2IAGgwPcSLmkSTc7iGQQG6RfBjlpckNWdHxEs3aADGyP6hErwcaJej5Wh0L8J1cfa+kqADcqwYYzBK+vdL/Avd8xm+U3d2BqsKuTZAu5AK93g== 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=fdJeC2kWIZIZdeObkmzMk7lTUT798Y0jJoEjwbupOSE=; b=4PiaADqgHsvJ/Nt7nrn4knJRKzySZzp965dRs1Vhy4f9N4zyc598HP1tOz8jKQT7VtlDG/gDBQ3xORduiysMgRmwS2LdWzkNYncI866AqEgBd23XaA/LM6S6oDMKBl+5TIWmKtDH5AoGtUvf9fwvH3TChKaouYRhM+XYo8+Ebhw= Received: from BN9PR03CA0866.namprd03.prod.outlook.com (2603:10b6:408:13d::31) by IA0PR12MB8087.namprd12.prod.outlook.com (2603:10b6:208:401::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.31; Mon, 17 Jul 2023 15:17:21 +0000 Received: from BN8NAM11FT039.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13d:cafe::a1) by BN9PR03CA0866.outlook.office365.com (2603:10b6:408:13d::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.33 via Frontend Transport; Mon, 17 Jul 2023 15:17:20 +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 BN8NAM11FT039.mail.protection.outlook.com (10.13.177.169) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6588.33 via Frontend Transport; Mon, 17 Jul 2023 15:17:20 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) 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; Mon, 17 Jul 2023 10:16:42 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) 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; Mon, 17 Jul 2023 10:16:33 -0500 Received: from iron-maiden.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Mon, 17 Jul 2023 10:16:33 -0500 From: Carlos Bilbao To: , CC: , , , , , Carlos Bilbao , Akira Yokosawa Subject: [PATCH v7 2/2] docs: Integrate rustdoc generation into htmldocs Date: Mon, 17 Jul 2023 10:16:24 -0500 Message-ID: <20230717151624.3470714-3-carlos.bilbao@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230717151624.3470714-1-carlos.bilbao@amd.com> References: <20230717151624.3470714-1-carlos.bilbao@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT039:EE_|IA0PR12MB8087:EE_ X-MS-Office365-Filtering-Correlation-Id: 5fd3a633-a67c-4ea8-db89-08db86d8ea12 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vIUFiZrcyuR8bNKKSRV3yiWP8TmU0zVlUQmm8K+CXf8jTKKvwB9vosfo6qV9F4lVnfGqSvjDMjhhwwUldEBsEGiY9cdLOAfSSe97nU7prZYXmNVxeK/6vrZBfQ8BRRFFzIEfQFx2sBnK1svGbrr5SX8hCHbLctuu1nvRj1Ybc4FziEIEnv0qMGP9O9BOLzonp1cf040Dme5Pq9NVZ6rtOWi9GFucxiMb+ABKGTLGs+erhZ3P5WdlDBdEhN4CkYpgRhFQAVnP2qyW82Cnpm3+PrrxY4s+suaoUSDJZu+ZTkISz6n4I6E634ojXRRzifNZj3lDQrfzfyQj+jY9E2hlUqcR9dzi5SeKQpHW4TZk/Qgav8c/zz26Bv6E05MJ2G013h+zqdzI1wlFKDxGsEk5Bz8TMoIq0LMkFhdH+wvvZhNcFwE/1fc7l3tgn//+KCTZhCORSgc/lzfSgT4/AMsQ7fzHa/9YyGLZpJatmN8CToHg/ACis7rFhct6cgn+mWdO0w7X1M/BUpC2lEEBwCa7LeCrUClWA/NjQORdV5IlOvduB9PVVJTF5z9C3/CcHABa046J0PHxj/BvcAVQMHcQmMm8kToqfQYf9ztNeOCg3vDicipkifR73NJ6EJ2kxtKraKUDOs+su9NdgfEJFS8Ug2Hl/5+P+N05sdst+/6qS+Z/jo/MO3d6QGfxzDddbDPVfq5EOBzX64AjRj4FjdKV3T4lAJFgJqK6f221QJF4DBmF1OP3B60NKKB84aTgVrep2Gw5zgxu+UqtXSGV06iPjA== 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)(396003)(346002)(376002)(39860400002)(136003)(451199021)(82310400008)(46966006)(36840700001)(40470700004)(40480700001)(40460700003)(54906003)(110136005)(356005)(81166007)(82740400003)(6666004)(7696005)(70206006)(41300700001)(478600001)(8676002)(8936002)(5660300002)(316002)(70586007)(4326008)(2616005)(336012)(36860700001)(186003)(1076003)(26005)(426003)(47076005)(86362001)(36756003)(44832011)(2906002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2023 15:17:20.0750 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5fd3a633-a67c-4ea8-db89-08db86d8ea12 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: BN8NAM11FT039.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB8087 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_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE 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: 1771682624345607414 X-GMAIL-MSGID: 1771682624345607414 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 --- Documentation/Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation/Makefile b/Documentation/Makefile index 023fa658a0a8..3c375c34fd81 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,20 @@ 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 +else + @echo " Skipping Rust documentation since CONFIG_RUST is not y." +endif +else + @echo " Skipping Rust documentation since .config was not found." +endif + texinfodocs: @$(srctree)/scripts/sphinx-pre-install --version-check @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,texinfo,$(var),texinfo,$(var)))