From patchwork Sat Mar 7 21:13:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3041 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 301B76193A for ; Sat, 7 Mar 2020 22:13:38 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B3BD924B for ; Sat, 7 Mar 2020 22:13:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1583615617; bh=EA1AQM3GJ9TBI5aNvLdZRVrzfFVbOl6cTT7lGygYfSQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tiXhkwhbxVqYhFPZ8zUbuK/Us2THr0nLq1H2WuR1WpXH0hOw6bsogh0gKGzHyzfkx Q0Qw4WoqiDYGfWXms9vYogzybGxuuU3HaQ3thRJHNpyvPJ/kCnXH1HTEPr3cCiB/Fn ZkyvBHW979bVo6GdAVnJ8QXb7fYh7DuuemdHOTRc= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sat, 7 Mar 2020 23:13:20 +0200 Message-Id: <20200307211326.26994-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200307211326.26994-1-laurent.pinchart@ideasonboard.com> References: <20200307211326.26994-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 1/7] include: libcamera: Improve automation of libcamera.h generation 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-List-Received-Date: Sat, 07 Mar 2020 21:13:38 -0000 The gen-header.sh script that generates libcamera.h takes all .h files in the include/libcamera/ directory, and manually adds the generated control_ids.h and version.h. This is fragile, as shown by the failure to add property_ids.h to the list in commit f870591a9bf5 ("libcamera: properties: Add location property"). To avoid future omissions, take all the .h.in files into account to generate libcamera.h. This also fixes the missing property_ids.h. Fixes: f870591a9bf5 ("libcamera: properties: Add location property") Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- include/libcamera/gen-header.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/libcamera/gen-header.sh b/include/libcamera/gen-header.sh index 7f7816c9f879..fcb9c5e16d07 100755 --- a/include/libcamera/gen-header.sh +++ b/include/libcamera/gen-header.sh @@ -16,10 +16,11 @@ cat < "$dst_file" EOF -headers=$(for header in "$src_dir"/*.h ; do +headers=$(for header in "$src_dir"/*.h "$src_dir"/*.h.in ; do header=$(basename "$header") + header="${header%.in}" echo "$header" -done ; echo "control_ids.h" ; echo "version.h" | sort) +done | sort) for header in $headers ; do echo "#include " >> "$dst_file"