From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 835ED4548D; Tue, 18 Jun 2024 14:51:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5B6434064A; Tue, 18 Jun 2024 14:51:21 +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 28152402B4 for ; Tue, 18 Jun 2024 14:51:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718715079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XcvFOrUEMDv3f0wjIBVKAgTYfpDRxCMCcB2dJup8fHQ=; b=AQCtT3QNAn34ujS4QpRN+jxspO23w9tX1mOZA9ca6XGRxMra5X2vrMyxOJb25Xn26J01bB /OwWaPIkxHdkDVjXh7NFzx3nZrpBEijzXNcShyna5ErXnCA0IZg1CXn/GSW2afi3tZP8DL TCBYHskZFQfm+sHcGg4RBTuqocJeFkM= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-8-Rah0PIuBPmSAKwOqtG6V-A-1; Tue, 18 Jun 2024 08:51:18 -0400 X-MC-Unique: Rah0PIuBPmSAKwOqtG6V-A-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6E65D19560BC for ; Tue, 18 Jun 2024 12:51:17 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.225.89]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 81D6819560AE for ; Tue, 18 Jun 2024 12:51:16 +0000 (UTC) From: David Marchand To: dev@dpdk.org Subject: [PATCH] build: raise error if requested application is unbuildable Date: Tue, 18 Jun 2024 14:51:12 +0200 Message-ID: <20240618125113.1591405-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 Similarly to libraries, when setting a list of desired applications, report if some application cannot be built because of a missing dependency. Signed-off-by: David Marchand --- app/meson.build | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/meson.build b/app/meson.build index 21b6da29b3..5b2c80c7a1 100644 --- a/app/meson.build +++ b/app/meson.build @@ -10,7 +10,9 @@ disable_apps = run_command(list_dir_globs, disable_apps, check: true).stdout().s enable_apps = ',' + get_option('enable_apps') enable_apps = run_command(list_dir_globs, enable_apps, check: true).stdout().split() +require_apps = true if enable_apps.length() == 0 + require_apps = false enable_apps = run_command(list_dir_globs, '*', check: true).stdout().split() endif @@ -74,6 +76,10 @@ foreach app:apps if build subdir(name) + if not build and require_apps + error('Cannot build explicitly requested app "@0@".\n'.format(name) + + '\tReason: ' + reason) + endif endif if build @@ -84,6 +90,10 @@ foreach app:apps build = false reason = 'missing internal dependency, "@0@"'.format(d) message('Missing dependency "@0@" for app "@1@"'.format(d, name)) + if require_apps + error('Cannot build explicitly requested app "@0@".\n'.format(name) + + '\tPlease add missing dependency "@0@" to "enable_libs" option'.format(d)) + endif break endif dep_objs += [get_variable(var_name)] -- 2.45.1