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 A0033A034F; Wed, 10 Nov 2021 17:49:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 91A4641169; Wed, 10 Nov 2021 17:49:19 +0100 (CET) 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 A4E364114B for ; Wed, 10 Nov 2021 17:49:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636562958; 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=1KdVGLJnJZNvEmgoPnzj9iS3ZRV5AnkN+shARRN34Fo=; b=NJeIXHb5weAq+Pqx42UBvM65kxKbKmV0Z4ooGpNfGZ/Rvzd8TZjJihm2ZNt231buYyK5hw 4VYsaU4hFQHp/+TjKHSWwAkakCboWDilU4qGCQ4ctKvPc43yaECo1wdwF8ZfIBObXCKsmC 5XWsw8rxLACw2U8hQQVFWy+nhOODB6M= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-21-KCZHfvQHNrOOhJZ0klbuhQ-1; Wed, 10 Nov 2021 11:49:15 -0500 X-MC-Unique: KCZHfvQHNrOOhJZ0klbuhQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A4EC11023F4E; Wed, 10 Nov 2021 16:49:13 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.192.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id DC61160854; Wed, 10 Nov 2021 16:49:02 +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 4/5] build: make pdump optional Date: Wed, 10 Nov 2021 17:48:13 +0100 Message-Id: <20211110164814.5231-5-david.marchand@redhat.com> In-Reply-To: <20211110164814.5231-1-david.marchand@redhat.com> References: <20211110164814.5231-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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 --- 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 b5f1a89edf..07fe4870b0 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -400,11 +400,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' @@ -415,6 +413,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') @@ -431,9 +434,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