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 D9ED845DB6; Wed, 27 Nov 2024 12:41:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C7474402C2; Wed, 27 Nov 2024 12:41:52 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id 7A731402B5 for ; Wed, 27 Nov 2024 12:41:50 +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 A7DE71474; Wed, 27 Nov 2024 03:42:19 -0800 (PST) Received: from localhost.localdomain (unknown [10.57.67.57]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CB71A3F58B; Wed, 27 Nov 2024 03:41:48 -0800 (PST) From: Paul Szczepanek To: dev@dpdk.org Cc: thomas@monjalon.net, Paul Szczepanek , Luca Vizzarro Subject: [PATCH v2] docs: remove html dir from nested docs Date: Wed, 27 Nov 2024 11:41:36 +0000 Message-Id: <20241127114136.1102663-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 nested docs. Signed-off-by: Paul Szczepanek Reviewed-by: Luca Vizzarro --- buildtools/call-sphinx-build.py | 7 +++++-- doc/api/meson.build | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/buildtools/call-sphinx-build.py b/buildtools/call-sphinx-build.py index 2c7de54285..fa245afa73 100755 --- a/buildtools/call-sphinx-build.py +++ b/buildtools/call-sphinx-build.py @@ -30,8 +30,11 @@ # 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 one but first + # remove the part of the path outside the tree in case html dir exists there + rel_path = os.path.relpath(dst, os.path.dirname(__file__)) + html_dst = dst if 'html' in rel_path 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