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 14D0AA0093; Thu, 13 Oct 2022 17:11:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB3BE43001; Thu, 13 Oct 2022 17:11:40 +0200 (CEST) Received: from smail.rz.tu-ilmenau.de (smail.rz.tu-ilmenau.de [141.24.186.67]) by mails.dpdk.org (Postfix) with ESMTP id D207B43000 for ; Thu, 13 Oct 2022 17:11:39 +0200 (CEST) Received: from [10.183.254.100] (unknown [80.88.23.165]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smail.rz.tu-ilmenau.de (Postfix) with ESMTPSA id 834CB580098; Thu, 13 Oct 2022 17:11:39 +0200 (CEST) Message-ID: <56efd282-60eb-cfae-78bf-c601c4ea5856@tu-ilmenau.de> Date: Thu, 13 Oct 2022 17:11:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH 1/2] build: allow to conditionally build apps To: Bruce Richardson Cc: dev@dpdk.org References: <20221012144704.77973-1-markus.theil@tu-ilmenau.de> Content-Language: en-US From: Markus Theil In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 10/12/22 17:19, Bruce Richardson wrote: > On Wed, Oct 12, 2022 at 04:47:03PM +0200, Markus Theil wrote: >> Makes apps configureable from meson, like already >> possible for drivers. >> >> Signed-off-by: Markus Theil >> --- >> app/meson.build | 17 ++++++++++++----- >> meson_options.txt | 4 ++++ >> 2 files changed, 16 insertions(+), 5 deletions(-) >> >> diff --git a/app/meson.build b/app/meson.build >> index 93d8c15032..4d9c8ee814 100644 >> --- a/app/meson.build >> +++ b/app/meson.build >> @@ -1,6 +1,9 @@ >> # SPDX-License-Identifier: BSD-3-Clause >> # Copyright(c) 2017-2019 Intel Corporation >> >> +enabled_apps = get_option('enable_apps') >> +disabled_apps = get_option('disable_apps') >> + >> apps = [ >> 'dumpcap', >> 'pdump', >> @@ -27,7 +30,11 @@ if get_option('default_library') == 'static' and not is_windows >> endif >> >> foreach app:apps >> - build = true >> + 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 >> sources = [] >> includes = [] >> @@ -41,6 +48,10 @@ foreach app:apps >> ext_deps = [] >> deps = [] >> >> + if not build >> + continue >> + endif >> + >> subdir(name) >> >> if build >> @@ -56,10 +67,6 @@ foreach app:apps >> endforeach >> endif >> >> - if not build >> - continue >> - endif >> - > Does this block not still need to be kept? Is it possible that build could > be set to false in the subdir or other logic? I will move the block to its old position in the next revision. Thanks for the hint. > /Bruce