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 48D19A0032; Wed, 19 Jan 2022 19:33:59 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E98BF4118A; Wed, 19 Jan 2022 19:33:58 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id AE25941147 for ; Wed, 19 Jan 2022 19:33:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642617237; x=1674153237; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LNP4neOjs5U3YeV8uUMmGc6TgdtZtJMPPtHEuhrXh3A=; b=QvAmagP3PUqoYoHkGDyjr8HpNvcMkIo5iHS+aOhHXP74ZqyLY/SE+ve+ +qkO7dxq5HI7POsecQQXV3VIzUYf0dUOOUYvH4h2+53R0Bgg+eINkp9x8 Gpq9jiKMRaGwePZZCU219MOnvSBjAsCuag8swj2J3RTRj5NCZJstPzZbz Nuk32fvFkmnUqE1Tlph1A5o+wIHiXkl19CTc8xStFI4KQMlbb0VQIwJxw qtjtrJ/JBOVWOsK0uk7tcG5SDoq3N4i+hb2bKwD3IVJxIt9TxUA4GrWOE S4r+FXqa0ywOzLKQYcKkB8ExD+j2E640pvXnloQf7ojsGKrFfzvCL9TPm g==; X-IronPort-AV: E=McAfee;i="6200,9189,10231"; a="331496392" X-IronPort-AV: E=Sophos;i="5.88,300,1635231600"; d="scan'208";a="331496392" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2022 10:10:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,300,1635231600"; d="scan'208";a="578907358" Received: from silpixa00399126.ir.intel.com ([10.237.223.86]) by fmsmga008.fm.intel.com with ESMTP; 19 Jan 2022 10:10:20 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson , Stephen Hemminger , =?UTF-8?q?Morten=20Br=C3=B8rup?= Subject: [PATCH v2 1/6] lib: allow recursive disabling of libs in build Date: Wed, 19 Jan 2022 18:09:57 +0000 Message-Id: <20220119181002.471195-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220119181002.471195-1-bruce.richardson@intel.com> References: <20220113173918.2700651-1-bruce.richardson@intel.com> <20220119181002.471195-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Align the code in lib/meson.build with that in drivers/meson.build to enable recursive disabling of libraries, i.e. if library b depends on library a, disable library b if a is disabled (either explicitly or implicitly). This allows libraries to be optional even if other DPDK libs depend on them, something that was not previously possible. Signed-off-by: Bruce Richardson Acked-by: Stephen Hemminger Acked-by: Morten Brørup --- lib/meson.build | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/lib/meson.build b/lib/meson.build index fbaa6ef7c2..af4662e942 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -134,23 +134,29 @@ foreach l:libraries warning('Library name, "@0@", and directory name, "@1@", do not match'.format(name, l)) endif - if not build - dpdk_libs_disabled += name - set_variable(name.underscorify() + '_disable_reason', reason) - continue - endif - shared_deps = ext_deps static_deps = ext_deps foreach d:deps + if not build + break + endif if not is_variable('shared_rte_' + d) - error('Missing internal dependency "@0@" for @1@ [@2@]' + build = false + reason = 'missing internal dependency, "@0@"'.format(d) + message('Disabling @1@ [@2@]: missing internal dependency "@0@"' .format(d, name, 'lib/' + l)) + else + shared_deps += [get_variable('shared_rte_' + d)] + static_deps += [get_variable('static_rte_' + d)] endif - shared_deps += [get_variable('shared_rte_' + d)] - static_deps += [get_variable('static_rte_' + d)] endforeach + if not build + dpdk_libs_disabled += name + set_variable(name.underscorify() + '_disable_reason', reason) + continue + endif + enabled_libs += name dpdk_conf.set('RTE_LIB_' + name.to_upper(), 1) install_headers(headers) -- 2.32.0