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 4CA3EA0093; Thu, 13 Jan 2022 18:39:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4B7ED4274F; Thu, 13 Jan 2022 18:39:53 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 73FD84274C for ; Thu, 13 Jan 2022 18:39:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642095591; x=1673631591; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=i34zhAHcV4/kPJp3da/6hjdU7aIUcBKc6wuaEA2VpbY=; b=Rw2e3LqbFeFhbdEnQtAIL0ozOjmx4LGgCsPwvQuTo55HupQ8dcCz+XxG oAwgkw91k96obPs8ebhcH9RibewlNIBK3dL3whBlgAznWnQ55s8kZYZZo 8iPXztIJO+kQoOL5DOPUww+ck75Dql9cPajYLf38mDTMnti3sadBxLMDj 5CwOTOi7rvU2HmOyayBwxIgaOx2F4VJOwWIiqMav8orny7bCz/TMeq0vw 8hhISPTJzLggIX5kKnCSHUhzcdjuf6PPXVj8uAThTyrZ847STG+P80kwh gB7RZIAfL2bRJXGMtbfd5mBdjt2Cve8+DHvIFQIPsQqcbMTgMo61oyaA9 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10226"; a="244275464" X-IronPort-AV: E=Sophos;i="5.88,286,1635231600"; d="scan'208";a="244275464" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2022 09:39:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,286,1635231600"; d="scan'208";a="475418188" Received: from silpixa00399126.ir.intel.com ([10.237.223.86]) by orsmga006.jf.intel.com with ESMTP; 13 Jan 2022 09:39:34 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH 1/6] lib: allow recursive disabling of libs in build Date: Thu, 13 Jan 2022 17:39:13 +0000 Message-Id: <20220113173918.2700651-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220113173918.2700651-1-bruce.richardson@intel.com> References: <20220113173918.2700651-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 --- 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