From patchwork Sat May 6 11:10:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 18607 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 0EFE6C0DA4 for ; Sat, 6 May 2023 11:10:21 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C7228633B8; Sat, 6 May 2023 13:10:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1683371420; bh=R4z8Rb37UZIXdLc4vjE+c2cqWkxu+nXAEEqNXX/7B8E=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=gHIQ1N9et+1putoZglsv+sD7EYgEJnqGWFZIoOi7ecS1EDksOrlQB8HffEAjhAxX8 M9bzAwRxkKRsUq4KWO1mrqwW0vSRvLu1aRsYaryvfHIezgMjuh2jmJU7SQ8E7gCmLp 1JoY2pQygqSFatXqzNqv+I49qUdS/d1/nPxlZi4RsefjuPKJsDTXENJ70G4u0t/xtr VSlkMOTygNnuBWLZDcwm2hU16zFdo0CvNx4lminvK5AFjzKQ/uVb1oo3OKW1wawkTX IPcImQMtVb+6SzO0fwT7HN5F66+OZ8qGUBj4KhyuzE+8qfKtglaDEd0KIuv+IGWB70 oM8KVaaoHzgrQ== 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 F2897633A8 for ; Sat, 6 May 2023 13:10:19 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="CvIPoRQn"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (133-32-181-51.west.xps.vectant.ne.jp [133.32.181.51]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9744C9CE; Sat, 6 May 2023 13:10:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1683371415; bh=R4z8Rb37UZIXdLc4vjE+c2cqWkxu+nXAEEqNXX/7B8E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CvIPoRQn9PSlvNce0Ce6ETKbyvuwjR47WsUAEf5F4Z3Degv99dV4IRKKg64BuzNYA DYiRqAr/RBfTMK22GFue37aQXmzm1gcoyUltzRmTbAnE2qeyGycn1zgTP3VGqCriOg 8ADmYQCE8ibEsmNnOU+Cw/QRvwHDEOoWzU2QqJrs= To: libcamera-devel@lists.libcamera.org Date: Sat, 6 May 2023 14:10:24 +0300 Message-Id: <20230506111025.18669-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20230506111025.18669-1-laurent.pinchart@ideasonboard.com> References: <20230506111025.18669-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v1 1/2] Documentation: Add predefined macros from config.h to Doxyfile 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: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" libcamera creates a config.h file with predefine macros, and instructs the compiler to include it implicitly with the -include argument. Doxygen has no support for implicit inclusion of headers, but has a PREDEFINED configuration option for its preprocessor that lists predefined macros. Populate it with the values from the config_h configuration data object that is used for generate the config.h file, to ensure that documentation matches the configuration options libcamera has been built with. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- Documentation/Doxyfile.in | 3 ++- Documentation/meson.build | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Documentation/Doxyfile.in b/Documentation/Doxyfile.in index 1447abdb7d8c..697a14d1dfe2 100644 --- a/Documentation/Doxyfile.in +++ b/Documentation/Doxyfile.in @@ -80,6 +80,7 @@ INCLUDE_FILE_PATTERNS = *.h PREDEFINED = __DOXYGEN__ \ __cplusplus \ - __attribute__(x)= + __attribute__(x)= \ + @PREDEFINED@ HAVE_DOT = YES diff --git a/Documentation/meson.build b/Documentation/meson.build index 186461561f8d..ed581163345e 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -16,6 +16,13 @@ if doxygen.found() and dot.found() cdata.set('TOP_BUILDDIR', meson.project_build_root()) cdata.set('OUTPUT_DIR', meson.current_build_dir()) + doxygen_predefined = [] + foreach key : config_h.keys() + doxygen_predefined += '@0@=@1@'.format(key, config_h.get(key)) + endforeach + + cdata.set('PREDEFINED', ' '.join(doxygen_predefined)) + doxyfile = configure_file(input : 'Doxyfile.in', output : 'Doxyfile', configuration : cdata)