From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 68DAE45DC3; Fri, 29 Nov 2024 00:06:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4729B402EF; Fri, 29 Nov 2024 00:06:37 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id 568954029D for ; Fri, 29 Nov 2024 00:06:35 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EE6F21474; Thu, 28 Nov 2024 15:07:03 -0800 (PST) Received: from localhost.localdomain (unknown [10.57.67.184]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 786003F66E; Thu, 28 Nov 2024 15:06:33 -0800 (PST) From: Paul Szczepanek To: dev@dpdk.org Cc: thomas@monjalon.net, Paul Szczepanek , Luca Vizzarro Subject: [PATCH v3] dts: remove html dir from nested docs Date: Thu, 28 Nov 2024 23:05:15 +0000 Message-Id: <20241128230515.1125653-1-paul.szczepanek@arm.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241126162506.1074550-1-paul.szczepanek@arm.com> References: <20241126162506.1074550-1-paul.szczepanek@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org To facilitate deploying docs to the website and make paths more consistent remove the html directory from docs nested in html directories. Signed-off-by: Paul Szczepanek Reviewed-by: Luca Vizzarro --- buildtools/call-sphinx-build.py | 6 ++++-- doc/api/meson.build | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/buildtools/call-sphinx-build.py b/buildtools/call-sphinx-build.py index 2c7de54285..3e5fc813a2 100755 --- a/buildtools/call-sphinx-build.py +++ b/buildtools/call-sphinx-build.py @@ -30,8 +30,10 @@ # run sphinx, putting the html output in a "html" directory with open(join(dst, 'sphinx_html.out'), 'w') as out: - process = run(sphinx_cmd + ['-b', 'html', src, join(dst, 'html')], - stdout=out) + # don't append html dir if dst is already nested in a html dir + top_2_dirs = os.path.join(*os.path.normpath(dst).split(os.path.sep)[-2:]) + html_dst = dst if 'html' in top_2_dirs else join(dst, 'html') + process = run(sphinx_cmd + ['-b', 'html', src, html_dst], stdout=out) # create a gcc format .d file giving all the dependencies of this doc build with open(join(dst, '.html.d'), 'w') as d: diff --git a/doc/api/meson.build b/doc/api/meson.build index f9f1326bbd..ac6eb8236d 100644 --- a/doc/api/meson.build +++ b/doc/api/meson.build @@ -37,7 +37,7 @@ cdata.set('OUTPUT', join_paths(dpdk_build_root, 'doc', 'api')) cdata.set('TOPDIR', dpdk_source_root) cdata.set('STRIP_FROM_PATH', ' '.join([dpdk_source_root, join_paths(dpdk_build_root, 'doc', 'api')])) cdata.set('WARN_AS_ERROR', 'NO') -cdata.set('DTS_API_MAIN_PAGE', join_paths('.', 'dts', 'html', 'index.html')) +cdata.set('DTS_API_MAIN_PAGE', join_paths('.', 'dts', 'index.html')) if get_option('werror') cdata.set('WARN_AS_ERROR', 'YES') endif -- 2.39.2