From patchwork Wed Jul 5 08:31:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 18791 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 2A32CBDC71 for ; Wed, 5 Jul 2023 08:31:15 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5ADBD628C0; Wed, 5 Jul 2023 10:31:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1688545874; bh=sUB2/YIKoVd/tm6O8jzPauHXYZ0YnztOVn59R1nX5CY=; 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=WuEdDoA8IU4/lw/FHnk2uCBvt6Ye4Exjt5iw48rMCrydrK/mfg8Vpp05lknoIekSb FfhM1NgLZyHK35t1hfU7Gt742oOPIBsdfam0Rt39AU/56sB4zz3L7hBYSxAQ5AenYW wTxzxfzGRZaB0BxuwOxBSXn86lrl7pFmGKLMU9rFTw3Iv/ii0YKIEQ5gWEeE4x6Ow1 8uoZdrTwrdUdufCdAJxUy4NvtkZSlPl7Nny1KvuXIyE8hkJm1+7rgWaB+cqTq+KyzL uP8JQkn2/rVfoMFLSG32Rlzzc/YLXArDVdoUiqPs4D2ZxqQMPe7riftxQjKJA+KVqd nAglFmsWHtHHQ== 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 51B2A61E34 for ; Wed, 5 Jul 2023 10:31:12 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="UarkMQqo"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (85-160-42-71.reb.o2.cz [85.160.42.71]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3B5EB6D5 for ; Wed, 5 Jul 2023 10:30:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1688545827; bh=sUB2/YIKoVd/tm6O8jzPauHXYZ0YnztOVn59R1nX5CY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UarkMQqoFNmAu46L0+4K1wDyp0IO+2ZFpvPwEkFZQOUsrMAfaMhEftl7z4TNJ9FNy YkZpAx/8FQ1/tnfhhrF/ug/NKcndFVsESG4nsDejbJBb5TCS84WJqyqOX27gjbD2+A jZlO1QwxR+7R2cLwQU9E2LcE170JZonFojcs1pYw= To: libcamera-devel@lists.libcamera.org Date: Wed, 5 Jul 2023 11:31:11 +0300 Message-Id: <20230705083111.32462-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20230704234422.11863-2-laurent.pinchart@ideasonboard.com> References: <20230704234422.11863-2-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2.1 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 predefined 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. Bump the minimum meson version to 0.57 to use cfg_data.keys(). Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Kieran Bingham --- Changes since v2: - Bump the minimum meson version to 0.57. Changes since v1: - Correct indentation and line wrap in the generate Doxyfile --- Documentation/Doxyfile.in | 3 ++- Documentation/meson.build | 7 +++++++ meson.build | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) 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..d675f368cf79 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', ' \\\n\t\t\t '.join(doxygen_predefined)) + doxyfile = configure_file(input : 'Doxyfile.in', output : 'Doxyfile', configuration : cdata) diff --git a/meson.build b/meson.build index 9c1e708131eb..62db8ed8105d 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: CC0-1.0 project('libcamera', 'c', 'cpp', - meson_version : '>= 0.56', + meson_version : '>= 0.57', version : '0.0.5', default_options : [ 'werror=true',