From patchwork Sun Mar 8 00:04:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3052 Return-Path: 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 D1290628F0 for ; Sun, 8 Mar 2020 01:04:42 +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 7388724B for ; Sun, 8 Mar 2020 01:04:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1583625882; bh=8kxyd005ARWtlJ/21kzYQJgWKN/5d6J4zzH+XdfH3Oo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fRhMwp4JGSMlRpt0Dqv+HYAzu20znV7c1tlpJdD/REfl4TvFNaYb/M1fwcPhf7Bdm 7F5hjD0v2z5Zo7ta+5azbEBmEjfwnJqbtft2pm3/8uY3gK50zAExmIwoc+borLpaV0 cBF0z44tFzwCoxsonB5n9HfJACLAHtJNlICDUg0w= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sun, 8 Mar 2020 02:04:28 +0200 Message-Id: <20200308000433.2917-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200308000433.2917-1-laurent.pinchart@ideasonboard.com> References: <20200308000433.2917-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 1/6] 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: Sun, 08 Mar 2020 00:04:43 -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 Reviewed-by: Niklas Söderlund --- 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"