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 E32E0A00C4; Fri, 28 Oct 2022 14:34:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8285840146; Fri, 28 Oct 2022 14:34:39 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 627E3400D5 for ; Fri, 28 Oct 2022 14:34:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666960476; 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=OFHqg23rP1zOXypko5kwsl/2I2X1eZRMR/73Br6H8LQ=; b=DHatOe0Gl6SW8RDZqxZCWxGiAJWp2l4bdYZv1tzpVYqW385+pc5D4hBURc39PaFlcY9vVJ orzLJrZQcIBCWSBKRH8Krqty6pDtwhlQHakKX0nZvHb4El+25pqYuBoTXCbkuSdhepIuGa mT+nzHR80sYNAPO+2y6qCLsTKqOA/2M= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [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-475-CNvM_4pTPdi8P5qHZuOGOA-1; Fri, 28 Oct 2022 08:34:33 -0400 X-MC-Unique: CNvM_4pTPdi8P5qHZuOGOA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3B9A73C11048; Fri, 28 Oct 2022 12:34:33 +0000 (UTC) Received: from localhost.localdomain (ovpn-192-75.brq.redhat.com [10.40.192.75]) by smtp.corp.redhat.com (Postfix) with ESMTP id 527812027062; Fri, 28 Oct 2022 12:34:32 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: bruce.richardson@intel.com, markus.theil@tu-ilmenau.de Subject: [PATCH] build: list selected applications Date: Fri, 28 Oct 2022 14:34:19 +0200 Message-Id: <20221028123419.1482918-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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 With the addition of enable/disable_apps meson options, it is a bit harder to figure out which application is built, and why. Display the list of applications in the same way we do for drivers and libraries. Signed-off-by: David Marchand --- app/meson.build | 37 +++++++++++++++++++++++++++---------- meson.build | 23 +++++++++++++++++++++-- 2 files changed, 48 insertions(+), 12 deletions(-) diff --git a/app/meson.build b/app/meson.build index 96b9a78d3a..c3eea8acbd 100644 --- a/app/meson.build +++ b/app/meson.build @@ -1,8 +1,14 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017-2019 Intel Corporation -enabled_apps = get_option('enable_apps') -disabled_apps = get_option('disable_apps') +disable_apps = ',' + get_option('disable_apps') +disable_apps = run_command(list_dir_globs, disable_apps, check: true).stdout().split() + +enable_apps = ',' + get_option('enable_apps') +enable_apps = run_command(list_dir_globs, enable_apps, check: true).stdout().split() +if enable_apps.length() == 0 + enable_apps = run_command(list_dir_globs, '*', check: true).stdout().split() +endif apps = [ 'dumpcap', @@ -29,13 +35,12 @@ if get_option('default_library') == 'static' and not is_windows default_ldflags += ['-Wl,--export-dynamic'] endif +enabled_apps = [] # used to print summary at the end + foreach app:apps - build = enabled_apps == '' or enabled_apps.contains(app) - # let disabled_apps override enabled_apps - if disabled_apps != '' - build = build and not disabled_apps.contains(app) - endif name = app + build = true + reason = '' # set if build == false to explain sources = [] includes = [] cflags = default_cflags @@ -48,11 +53,17 @@ foreach app:apps ext_deps = [] deps = [] - if not build - continue + if not enable_apps.contains(app) + build = false + reason = 'not in enabled apps build config' + elif disable_apps.contains(app) + build = false + reason = 'explicitly disabled via build config' endif - subdir(name) + if build + subdir(name) + endif if build dep_objs = [] @@ -60,6 +71,7 @@ foreach app:apps var_name = get_option('default_library') + '_rte_' + d if not is_variable(var_name) build = false + reason = 'missing internal dependency, "@0@"'.format(d) message('Missing dependency "@0@" for app "@1@"'.format(d, name)) break endif @@ -68,9 +80,14 @@ foreach app:apps endif if not build + if reason != '' + dpdk_apps_disabled += app + set_variable(app.underscorify() + '_disable_reason', reason) + endif continue endif + enabled_apps += app link_libs = [] if get_option('default_library') == 'static' link_libs = dpdk_static_libraries + dpdk_drivers diff --git a/meson.build b/meson.build index d1cf039297..f91d652bc5 100644 --- a/meson.build +++ b/meson.build @@ -42,6 +42,7 @@ dpdk_driver_classes = [] dpdk_drivers = [] dpdk_extra_ldflags = [] dpdk_libs_deprecated = [] +dpdk_apps_disabled = [] dpdk_libs_disabled = [] dpdk_drvs_disabled = [] testpmd_drivers_sources = [] @@ -115,8 +116,21 @@ if meson.is_subproject() subdir('buildtools/subproject') endif -# final output, list all the libs and drivers to be built -# this does not affect any part of the build, for information only. +# Final output, list all the parts to be built. +# This does not affect any part of the build, for information only. +output_message = '\n=================\nApplications Enabled\n=================\n' +output_message += '\napps:\n\t' +output_count = 0 +foreach app:enabled_apps + output_message += app + ', ' + output_count += 1 + if output_count == 8 + output_message += '\n\t' + output_count = 0 + endif +endforeach +message(output_message + '\n') + output_message = '\n=================\nLibraries Enabled\n=================\n' output_message += '\nlibs:\n\t' output_count = 0 @@ -147,6 +161,11 @@ endforeach message(output_message + '\n') output_message = '\n=================\nContent Skipped\n=================\n' +output_message += '\napps:\n\t' +foreach app:dpdk_apps_disabled + reason = get_variable(app.underscorify() + '_disable_reason') + output_message += app + ':\t' + reason + '\n\t' +endforeach output_message += '\nlibs:\n\t' foreach lib:dpdk_libs_disabled reason = get_variable(lib.underscorify() + '_disable_reason') -- 2.37.3