{"id":3041,"url":"https://patchwork.libcamera.org/api/patches/3041/?format=json","web_url":"https://patchwork.libcamera.org/patch/3041/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20200307211326.26994-2-laurent.pinchart@ideasonboard.com>","date":"2020-03-07T21:13:20","name":"[libcamera-devel,v3,1/7] include: libcamera: Improve automation of libcamera.h generation","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"4606308deaafccef2ef4882b21b616c82f8c6e29","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/3041/mbox/","series":[{"id":710,"url":"https://patchwork.libcamera.org/api/series/710/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=710","date":"2020-03-07T21:13:19","name":"Fix race condition and other build issues","version":3,"mbox":"https://patchwork.libcamera.org/series/710/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/3041/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/3041/checks/","tags":{},"headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 301B76193A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  7 Mar 2020 22:13:38 +0100 (CET)","from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B3BD924B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  7 Mar 2020 22:13:37 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1583615617;\n\tbh=EA1AQM3GJ9TBI5aNvLdZRVrzfFVbOl6cTT7lGygYfSQ=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=tiXhkwhbxVqYhFPZ8zUbuK/Us2THr0nLq1H2WuR1WpXH0hOw6bsogh0gKGzHyzfkx\n\tQ0Qw4WoqiDYGfWXms9vYogzybGxuuU3HaQ3thRJHNpyvPJ/kCnXH1HTEPr3cCiB/Fn\n\tZkyvBHW979bVo6GdAVnJ8QXb7fYh7DuuemdHOTRc=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","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","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3 1/7] include: libcamera: Improve\n\tautomation of libcamera.h generation","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Sat, 07 Mar 2020 21:13:38 -0000"},"content":"The gen-header.sh script that generates libcamera.h takes all .h files\nin the include/libcamera/ directory, and manually adds the generated\ncontrol_ids.h and version.h. This is fragile, as shown by the failure to\nadd property_ids.h to the list in commit f870591a9bf5 (\"libcamera:\nproperties: Add location property\").\n\nTo avoid future omissions, take all the .h.in files into account to\ngenerate libcamera.h. This also fixes the missing property_ids.h.\n\nFixes: f870591a9bf5 (\"libcamera: properties: Add location property\")\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/gen-header.sh | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)","diff":"diff --git a/include/libcamera/gen-header.sh b/include/libcamera/gen-header.sh\nindex 7f7816c9f879..fcb9c5e16d07 100755\n--- a/include/libcamera/gen-header.sh\n+++ b/include/libcamera/gen-header.sh\n@@ -16,10 +16,11 @@ cat <<EOF > \"$dst_file\"\n \n EOF\n \n-headers=$(for header in \"$src_dir\"/*.h ; do\n+headers=$(for header in \"$src_dir\"/*.h \"$src_dir\"/*.h.in ; do\n \theader=$(basename \"$header\")\n+\theader=\"${header%.in}\"\n \techo \"$header\"\n-done ; echo \"control_ids.h\" ; echo \"version.h\" | sort)\n+done | sort)\n \n for header in $headers ; do\n \techo \"#include <libcamera/$header>\" >> \"$dst_file\"\n","prefixes":["libcamera-devel","v3","1/7"]}