From patchwork Mon Sep 8 14:07:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 24294 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 24A66BDB13 for ; Mon, 8 Sep 2025 14:08:42 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D7FFD69359; Mon, 8 Sep 2025 16:08:41 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="FgQeGD9r"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id BCFCA69368 for ; Mon, 8 Sep 2025 16:08:39 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:c241:40fd:9e5d:437c]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 556E7C71; Mon, 8 Sep 2025 16:07:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1757340447; bh=RFDifQdtvXRcsfC5c7TEpe9l5AH0nOk843nQJw1cwIA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FgQeGD9rut31hLSi0fUBuVRP63bR3iVh/mH9mAQ7ugvbaYEJJlRzPhoEh/GIw2W82 jfdZOLhMg5JkV5F53dHi06BH76LKlmQ2Ab5jBOB/mDX9Dbe5bnFPVZJ1/I9iZuBNf2 u4zm6+fxe0L3WeoUkVTOH6Q9q9S0pNBjcB7mlFmY= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH 4/6] documentation: Include API docs in the sphinx documentation Date: Mon, 8 Sep 2025 16:07:47 +0200 Message-ID: <20250908140803.123272-5-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250908140803.123272-1-stefan.klug@ideasonboard.com> References: <20250908140803.123272-1-stefan.klug@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This commit prepares the move of all the libcamera documetation to a place separate from the website. This makes it easier to handle website and docs separately. The index is updated to mimic the structure currently available on the website. The build process now first creates the sphinx documentation and then copies the doxygen documentation into the sphinx output directory. Signed-off-by: Stefan Klug --- ToDo: - The meson custom targets still need some love. We need to decide what gets installed and in what structure. --- Documentation/conf.py.in | 4 ++-- Documentation/index.rst | 31 +++++++++++++++++++------------ Documentation/introduction.rst | 6 ------ Documentation/meson.build | 21 +++++++++++++++++---- 4 files changed, 38 insertions(+), 24 deletions(-) diff --git a/Documentation/conf.py.in b/Documentation/conf.py.in index 44e9aaf133ef..c772f643fb7c 100644 --- a/Documentation/conf.py.in +++ b/Documentation/conf.py.in @@ -75,11 +75,11 @@ pygments_style = None doxylink = { 'doxy-pub': ( '@TOP_BUILDDIR@/Documentation/api-html/tagfile.xml', - '../api-html/', + 'api-html/', ), 'doxy-int': ( '@TOP_BUILDDIR@/Documentation/internal-api-html/tagfile.xml', - '../internal-api-html/', + 'internal-api-html/', ), } diff --git a/Documentation/index.rst b/Documentation/index.rst index 251112fbdf5f..f6b9994c58c4 100644 --- a/Documentation/index.rst +++ b/Documentation/index.rst @@ -4,28 +4,35 @@ .. toctree:: :maxdepth: 1 - :caption: Contents: + :caption: For Users + + Introduction + Feature Requirements + Application Writer's Guide + Python Bindings + Environment variables + Public-API + +.. toctree:: + :maxdepth: 1 + :caption: For Developers - Home Contribute Getting Started - - Application Writer's Guide Camera Sensor Model - Environment variables - Feature Requirements IPA Writer's guide - Lens driver requirements libcamera Architecture Pipeline Handler Writer's Guide - Python Bindings - Sensor driver requirements SoftwareISP Benchmarking Tracing guide - Design document: AE + Internal-API .. toctree:: - :hidden: + :maxdepth: 1 + :caption: For System Integrators + + Lens driver requirements + Sensor driver requirements + - introduction diff --git a/Documentation/introduction.rst b/Documentation/introduction.rst index 82aa11a30f33..d76cebd05ee1 100644 --- a/Documentation/introduction.rst +++ b/Documentation/introduction.rst @@ -6,12 +6,6 @@ Introduction ************ -.. toctree:: - :hidden: - - API - Internal API - What is libcamera? ================== diff --git a/Documentation/meson.build b/Documentation/meson.build index f73407432fff..f9d17935749f 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -13,6 +13,7 @@ if doxygen.found() and dot.found() cdata = configuration_data() cdata.set('VERSION', 'v@0@'.format(libcamera_git_version)) cdata.set('TOP_SRCDIR', meson.project_source_root()) + cdata.set('CURRENT_SRCDIR', meson.current_source_dir()) cdata.set('TOP_BUILDDIR', meson.project_build_root()) cdata.set('OUTPUT_DIR', meson.current_build_dir()) cdata.set('WARN_AS_ERROR', get_option('doc_werror') ? 'YES' : 'NO') @@ -150,6 +151,7 @@ if sphinx.found() sphinx_conf_dir = fs.parent(sphinx_conf) docs_sources = [ + 'api-html/index.rst', 'camera-sensor-model.rst', 'code-of-conduct.rst', 'coding-style.rst', @@ -164,6 +166,7 @@ if sphinx.found() 'guides/pipeline-handler.rst', 'guides/tracing.rst', 'index.rst', + 'internal-api-html/index.rst', 'introduction.rst', 'lens_driver_requirements.rst', 'libcamera_architecture.rst', @@ -176,17 +179,27 @@ if sphinx.found() release = 'release=v' + libcamera_git_version - custom_target('documentation', + + + documentation_sphinx = custom_target('documentation-sphinx', command : [sphinx, '-D', release, '-q', '-W', '-b', 'html', '-c', sphinx_conf_dir, - meson.current_source_dir(), '@OUTPUT@'], + meson.current_source_dir(), '@OUTDIR@/html'], input : docs_sources, - output : 'html', + output: 'sphinx-build', build_by_default : true, depends : [ doxygen_public, doxygen_internal, - ], + ]) + + custom_target('documentation', + command : ['cp', '-r', '@OUTDIR@/api-html', '@OUTDIR@/internal-api-html', '@OUTDIR@/html'], + output : 'html', + depends: [documentation_sphinx], + build_by_default : true, + build_always_stale : true, + output: 'html', install : true, install_dir : doc_install_dir, install_tag : 'doc')