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 C4EBF45BD5; Fri, 25 Oct 2024 12:35:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 711B240156; Fri, 25 Oct 2024 12:35:39 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id DE9844003C for ; Fri, 25 Oct 2024 12:35:37 +0200 (CEST) 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 77B86339; Fri, 25 Oct 2024 03:36:06 -0700 (PDT) Received: from localhost.localdomain (unknown [10.57.64.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1DAFF3F73B; Fri, 25 Oct 2024 03:35:35 -0700 (PDT) From: Paul Szczepanek To: dev@dpdk.org Cc: probb@iol.unh.edu, Paul Szczepanek Subject: [PATCH v2] dts: fix doxygen API link and DTS docs placement Date: Fri, 25 Oct 2024 11:35:20 +0100 Message-Id: <20241025103520.394951-1-paul.szczepanek@arm.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241023145732.286071-1-paul.szczepanek@arm.com> References: <20241023145732.286071-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 Alias used to produce the link to the DTS API docs uses config data. The required value in config data was being added in the wrong scope. This moves the key addition to where the config data object is created. DTS docs need to be placed in the same dir as main API docs. Made DTS docs dependent on main docs and stopped separate install step relying instead on the parent docs to install them. This means they can no longer be build without main docs. Added a line to sphinx python wrapper to create the destination path if not already present. Fixes: 7f9326423a04 ("dts: add API doc generation") Signed-off-by: Paul Szczepanek Acked-by: Patrick Robb --- buildtools/call-sphinx-build.py | 3 +++ doc/api/dts/meson.build | 12 +++++------- doc/api/meson.build | 7 ++++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/buildtools/call-sphinx-build.py b/buildtools/call-sphinx-build.py index 5810b7c84e..2c7de54285 100755 --- a/buildtools/call-sphinx-build.py +++ b/buildtools/call-sphinx-build.py @@ -25,6 +25,9 @@ for root, dirs, files in os.walk(src): srcfiles.extend([join(root, f) for f in files]) +# create destination path if not already present +os.makedirs(dst, exist_ok=True) + # 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')], diff --git a/doc/api/dts/meson.build b/doc/api/dts/meson.build index 5115df7095..fc147f13f3 100644 --- a/doc/api/dts/meson.build +++ b/doc/api/dts/meson.build @@ -11,21 +11,19 @@ if python_ver_satisfied != 0 subdir_done() endif -cdata.set('DTS_API_MAIN_PAGE', join_paths('..', 'dts', 'html', 'index.html')) - extra_sphinx_args = ['-E', '-c', join_paths(doc_source_dir, 'guides')] if get_option('werror') extra_sphinx_args += '-W' endif -htmldir = join_paths(get_option('datadir'), 'doc', 'dpdk', 'dts') +# DTS docs are generated inside main Doxygen docs build directory +# DTS docs relies on main docs to install it so does not define install dir dts_api_html = custom_target('dts_api_html', + depends: doxy_html_build, output: 'html', command: [sphinx_wrapper, sphinx, meson.project_version(), - meson.current_source_dir(), meson.current_build_dir(), extra_sphinx_args], - build_by_default: get_option('enable_docs'), - install: get_option('enable_docs'), - install_dir: htmldir) + meson.current_source_dir(), join_paths(api_build_dir, 'html', 'dts'), extra_sphinx_args], + build_by_default: get_option('enable_docs')) doc_targets += dts_api_html doc_target_names += 'DTS_API_HTML' diff --git a/doc/api/meson.build b/doc/api/meson.build index ae23e9825e..f9f1326bbd 100644 --- a/doc/api/meson.build +++ b/doc/api/meson.build @@ -4,9 +4,6 @@ doxygen = find_program('doxygen', required: get_option('enable_docs')) if not doxygen.found() - # process DTS API doc build even if DPDK API doc build can't be done - cdata = configuration_data() - subdir('dts') subdir_done() endif @@ -40,6 +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')) if get_option('werror') cdata.set('WARN_AS_ERROR', 'YES') endif @@ -104,4 +102,7 @@ if mandb.found() and get_option('enable_docs') meson.add_install_script(mandb) endif +# used by DTS to place its files into +api_build_dir = meson.current_build_dir() + subdir('dts') -- 2.39.2