From patchwork Tue Aug 1 08:52:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 129780 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2551042FB0; Tue, 1 Aug 2023 10:53:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A74DA40A7D; Tue, 1 Aug 2023 10:53:03 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 4CF6C400D5 for ; Tue, 1 Aug 2023 10:53:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690879981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MFa4/0+vWWioXoqVfy/MivZ1meyYDqxnH/Z1vdItts8=; b=Om6NNWBYB9890+BFSErJZGR1Ddr/tkkudluS5kq1+ZWllsqqhc6RhFL2Funxa0kbWXtBZW Mmx+iiwNLRBEz5K0LAhu6/UvpdNUpdUqlxXZOeGV/BikvBJM6LqHB+XEnXvJRJw5UleFgw jGJjc/DF598cMf7UuHY0S2ccdQ35K1c= Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-218-LRx17KnKOiGAePMCKYyPKg-1; Tue, 01 Aug 2023 04:52:58 -0400 X-MC-Unique: LRx17KnKOiGAePMCKYyPKg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2EF083815F66; Tue, 1 Aug 2023 08:52:58 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.120]) by smtp.corp.redhat.com (Postfix) with ESMTP id 93DBBF7FA3; Tue, 1 Aug 2023 08:52:57 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: bruce.richardson@intel.com Subject: [PATCH] build: check drivers class dependencies early Date: Tue, 1 Aug 2023 10:52:53 +0200 Message-ID: <20230801085253.2447095-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Drivers implementing a class of devices (for example, drivers/event) depend on the associated abstraction library (lib/eventdev). This dependency is expressed in the top level meson.build for this class (drivers/event/meson.build). As we are making more libraries optional, custom constructs referencing the class dependencies in some drivers meson.build (event/dlb2) may break. It would be possible to add more checks in those drivers meson.build but it is more straightforward to not even consider a driver meson.build when the class dependencies are not met. Signed-off-by: David Marchand Acked-by: Morten Brørup --- drivers/meson.build | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/meson.build b/drivers/meson.build index 74ae8cb96b..c375352e77 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -70,6 +70,17 @@ foreach subpath:subdirs else class = subpath subdir(class) + skip_class = false + foreach d:std_deps + if not is_variable('shared_rte_' + d) + skip_class = true + message('Disabling all @1@ drivers: missing internal dependency "@0@"' + .format(d, class)) + endif + endforeach + if skip_class + continue + endif endif # save class name on first occurrence