From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: Paul Szczepanek <paul.szczepanek@arm.com>,
Luca Vizzarro <luca.vizzarro@arm.com>,
Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH v4] dts: remove nested html dir for API doc
Date: Fri, 29 Nov 2024 12:54:26 +0100 [thread overview]
Message-ID: <20241129115528.194137-1-thomas@monjalon.net> (raw)
In-Reply-To: <20241126162506.1074550-1-paul.szczepanek@arm.com>
From: Paul Szczepanek <paul.szczepanek@arm.com>
To facilitate deploying docs to the website
and make paths more consistent remove the html
directory from docs nested in API html directory.
Signed-off-by: Paul Szczepanek <paul.szczepanek@arm.com>
Reviewed-by: Luca Vizzarro <luca.vizzarro@arm.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
v4: fix custom.css path and reword a little
---
buildtools/call-sphinx-build.py | 8 +++++---
doc/api/meson.build | 2 +-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/buildtools/call-sphinx-build.py b/buildtools/call-sphinx-build.py
index 2c7de54285..c891f68ae4 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
+ last_two_dirs = os.path.join(*os.path.normpath(dst).split(os.path.sep)[-2:])
+ html_dst = dst if 'html' in last_two_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:
@@ -40,7 +42,7 @@
# copy custom CSS file
css = 'custom.css'
src_css = join(src, css)
-dst_css = join(dst, 'html', '_static', 'css', css)
+dst_css = join(html_dst, '_static', 'css', css)
if not os.path.exists(dst_css) or not filecmp.cmp(src_css, dst_css):
os.makedirs(os.path.dirname(dst_css), exist_ok=True)
shutil.copyfile(src_css, dst_css)
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.47.1
next prev parent reply other threads:[~2024-11-29 11:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-26 16:25 [PATCH] dts: remove html dir from dts doc path Paul Szczepanek
2024-11-27 0:02 ` Thomas Monjalon
2024-11-27 11:41 ` [PATCH v2] docs: remove html dir from nested docs Paul Szczepanek
2024-11-27 12:35 ` Thomas Monjalon
2024-11-28 23:05 ` [PATCH v3] dts: " Paul Szczepanek
2024-11-29 11:39 ` Thomas Monjalon
2024-11-29 11:54 ` Thomas Monjalon [this message]
2024-11-29 12:15 ` [PATCH v4] dts: remove nested html dir for API doc Paul Szczepanek
2024-11-29 12:59 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241129115528.194137-1-thomas@monjalon.net \
--to=thomas@monjalon.net \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=luca.vizzarro@arm.com \
--cc=paul.szczepanek@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).