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 216DAA0C41; Wed, 17 Nov 2021 12:30:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 65C3E41C27; Wed, 17 Nov 2021 12:30:50 +0100 (CET) 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 E6A574122E for ; Wed, 17 Nov 2021 12:30:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637148648; 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: in-reply-to:in-reply-to:references:references; bh=wlg0L2Vsj/piA/sy0WuLx1wn5Vi4N5uQpXene9/+6h8=; b=JFpcBAl7Q7B9WdxwatXTSYb8+u/UYxZQdsUXpnvx/lgX08yA5RWDsih5ij5+EUYPUihZDa Lqz5UXMrq7rQs0YZwO6A5lUxFsNzL2DuBVHmqJMfWi78ZVSfy0z/jCHbAGDAuPoXjfIaXn oT/p3wcgliNxaJFYK/QlJB8v/1ylNcY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-162-C58sWiXkPaestUB5FkJuXg-1; Wed, 17 Nov 2021 06:30:47 -0500 X-MC-Unique: C58sWiXkPaestUB5FkJuXg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2D06B10168C0; Wed, 17 Nov 2021 11:30:46 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.192.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2DF019329; Wed, 17 Nov 2021 11:30:42 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: bruce.richardson@intel.com, thomas@monjalon.net, bluca@debian.org, tredaelli@redhat.com, i.maximets@ovn.org, james.r.harris@intel.com, mohammed@hawari.fr Subject: [PATCH v2 4/5] build: make pdump optional Date: Wed, 17 Nov 2021 12:28:46 +0100 Message-Id: <20211117112847.7362-5-david.marchand@redhat.com> In-Reply-To: <20211117112847.7362-1-david.marchand@redhat.com> References: <20211110164814.5231-1-david.marchand@redhat.com> <20211117112847.7362-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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 This library can be made optional. dumpcap and pdump applications depend on this library, check for dependencies like what we have for examples. Signed-off-by: David Marchand Acked-by: Bruce Richardson Acked-by: Thomas Monjalon --- app/meson.build | 18 +++++++++++++----- app/test/meson.build | 10 +++++----- lib/meson.build | 1 + 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/app/meson.build b/app/meson.build index 310e83076f..93d8c15032 100644 --- a/app/meson.build +++ b/app/meson.build @@ -43,15 +43,23 @@ foreach app:apps subdir(name) + if build + dep_objs = [] + foreach d:deps + var_name = get_option('default_library') + '_rte_' + d + if not is_variable(var_name) + build = false + message('Missing dependency "@0@" for app "@1@"'.format(d, name)) + break + endif + dep_objs += [get_variable(var_name)] + endforeach + endif + if not build continue endif - dep_objs = [] - foreach d:deps - dep_objs += get_variable(get_option('default_library') + '_rte_' + d) - endforeach - link_libs = [] if get_option('default_library') == 'static' link_libs = dpdk_static_libraries + dpdk_drivers diff --git a/app/test/meson.build b/app/test/meson.build index 0d261b1138..961bebc5cb 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -407,11 +407,9 @@ if dpdk_conf.has('RTE_NET_RING') test_sources += 'test_pmd_ring.c' test_sources += 'test_event_eth_tx_adapter.c' test_sources += 'sample_packet_forward.c' - test_sources += 'test_pdump.c' fast_tests += [['ring_pmd_autotest', true]] perf_test_names += 'ring_pmd_perf_autotest' fast_tests += [['event_eth_tx_adapter_autotest', false]] - fast_tests += [['pdump_autotest', true]] if dpdk_conf.has('RTE_LIB_BITRATESTATS') test_deps += 'bitratestats' test_sources += 'test_bitratestats.c' @@ -422,6 +420,11 @@ if dpdk_conf.has('RTE_NET_RING') test_sources += 'test_latencystats.c' fast_tests += [['latencystats_autotest', true]] endif + if dpdk_conf.has('RTE_LIB_PDUMP') + test_deps += 'pdump' + test_sources += 'test_pdump.c' + fast_tests += [['pdump_autotest', true]] + endif endif if dpdk_conf.has('RTE_HAS_LIBPCAP') @@ -438,9 +441,6 @@ endif if dpdk_conf.has('RTE_LIB_KNI') test_deps += 'kni' endif -if dpdk_conf.has('RTE_LIB_PDUMP') - test_deps += 'pdump' -endif if cc.has_argument('-Wno-format-truncation') cflags += '-Wno-format-truncation' diff --git a/lib/meson.build b/lib/meson.build index 961b95f4ad..dad9fce14d 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -73,6 +73,7 @@ optional_libs = [ 'jobstats', 'latencystats', 'metrics', + 'pdump', 'power', 'vhost', ] -- 2.23.0