From patchwork Sat Mar 7 21:13:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3047 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 54BBE628E3 for ; Sat, 7 Mar 2020 22:13:40 +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 CDA9924B; Sat, 7 Mar 2020 22:13:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1583615620; bh=Cm5nswTA5+burNLwZAXRR6F5EtulJQGauPiG6I7Pf/4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C1oQMa+unUdD4hRrSts+HPPIpBOmmyxgevnL7joObHgWO9ubw3uhjW6uhSFVUGpkd kVBhLSJ5/NXgi6SOlS/myza985jOFQAckW662rLiXpxd/Lz21OMzOIhFMX35tSh4dM FYPEVNUAXtmHT6jQ8lFFmi966q646AZ/tWkw2sO4= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sat, 7 Mar 2020 23:13:26 +0200 Message-Id: <20200307211326.26994-8-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 7/7] libcamera: Declare dependency on generated headers 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:41 -0000 From: Kieran Bingham The control headers are generated automatically by parsing our YAML descriptions, and creating the control headers. These headers are included by internal libcamera source files, but the build system isn't informed of this dependency. This allows a race condition to occur in builds where objects are attempted to be built before the included headers have been generated, resulting in a build failure or, worse, in a successful but incorrect build. Declare a dependency on the control headers for libcamera to ensure that they are built before compiling any object within the libcamera library. Signed-off-by: Kieran Bingham [Split the change out and reworded commit message] Signed-off-by: Laurent Pinchart --- src/libcamera/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index ac6f597c6188..692ca5899f3a 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -97,6 +97,7 @@ libcamera_deps = [ cc.find_library('dl'), libudev, dependency('threads'), + declare_dependency(sources : [control_headers]) ] libcamera_link_with = []