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 37400A04A4 for ; Tue, 1 Mar 2022 15:09:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 32316426FC; Tue, 1 Mar 2022 15:09:00 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id D75AC426FC for ; Tue, 1 Mar 2022 15:08:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646143739; x=1677679739; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=d0jUx/YYfgZXD7EIenBTwj7154006iIPwRzI+mWIM3o=; b=mh1gbrqWOW7ZnhMF8Py2MqG5WBNaeDkhzKkALbyMSZk6sOQIa0EiSgGv m2XZLIjYlS6V9g5TV4omy8cv4aQyYazDn1GQAjS32N5+R2AiDWpWK4ka5 FIWlCy1jBAcp6s55Qka+grZdff9Z4jn66TvKTUSAXpVHy1ls0GVA0gmxU N3kmZFzYQSGyCFXduP/jslUIEC7Xa88bR6WQvsHXCl5dKiF4aqZ9r4UQb vtMiq5dp7dcOAm1t1g6Dmbpbduat1aksPGVYGDVaBYjBJtd9QJGpiFVtR OjTiCiAmOqGjZfAkncU9NyyaWIbM/KvsWNzwieqNqSoGi2TRwZPxWGCjX g==; X-IronPort-AV: E=McAfee;i="6200,9189,10272"; a="251967509" X-IronPort-AV: E=Sophos;i="5.90,146,1643702400"; d="scan'208";a="251967509" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2022 06:08:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,146,1643702400"; d="scan'208";a="510522981" Received: from silpixa00399126.ir.intel.com ([10.237.223.34]) by orsmga006.jf.intel.com with ESMTP; 01 Mar 2022 06:08:57 -0800 From: Bruce Richardson To: stable@dpdk.org Cc: christian.ehrhardt@canonical.com, Bruce Richardson , Jerin Jacob Subject: [PATCH 19.11 3/4] build: remove deprecated Meson functions Date: Tue, 1 Mar 2022 14:08:37 +0000 Message-Id: <20220301140838.406891-4-bruce.richardson@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220301140838.406891-1-bruce.richardson@intel.com> References: <20220301140838.406891-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Starting in meson 0.56, the functions meson.source_root() and meson.build_root() are deprecated and to be replaced by the [more descriptive] functions: project_source_root()/global_source_root() and project_build_root()/global_build_root(). Unfortunately, these new replacement functions were only added in 0.56 release too, so to use them we would need version checks for old/new functions to remove the deprecation warnings. However, the functions "current_build_dir()" and "current_source_dir()" remain unaffected by all this, so we can bypass the versioning problem, by saving off these values to "dpdk_source_root" and "dpdk_build_root" in the top-level meson.build file Bugzilla ID: 926 Cc: stable@dpdk.org Signed-off-by: Bruce Richardson Tested-by: Jerin Jacob --- doc/api/meson.build | 10 +++++----- kernel/freebsd/meson.build | 4 ++-- kernel/linux/kni/meson.build | 8 ++++---- meson.build | 2 ++ 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/doc/api/meson.build b/doc/api/meson.build index ec0357b2cd..72f522627d 100644 --- a/doc/api/meson.build +++ b/doc/api/meson.build @@ -24,7 +24,7 @@ htmldir = join_paths('share', 'doc', 'dpdk') # So use a configure option for now. example = custom_target('examples.dox', output: 'examples.dox', - command: [generate_examples, join_paths(meson.source_root(), 'examples'), '@OUTPUT@'], + command: [generate_examples, join_paths(dpdk_source_root, 'examples'), '@OUTPUT@'], depfile: 'examples.dox.d', install: get_option('enable_docs'), install_dir: htmldir, @@ -32,11 +32,11 @@ example = custom_target('examples.dox', cdata = configuration_data() cdata.set('VERSION', meson.project_version()) -cdata.set('API_EXAMPLES', join_paths(meson.build_root(), 'doc', 'api', 'examples.dox')) -cdata.set('OUTPUT', join_paths(meson.build_root(), 'doc', 'api')) +cdata.set('API_EXAMPLES', join_paths(dpdk_build_root, 'doc', 'api', 'examples.dox')) +cdata.set('OUTPUT', join_paths(dpdk_build_root, 'doc', 'api')) cdata.set('HTML_OUTPUT', 'api') -cdata.set('TOPDIR', meson.source_root()) -cdata.set('STRIP_FROM_PATH', ' '.join([meson.source_root(), join_paths(meson.build_root(), 'doc', 'api')])) +cdata.set('TOPDIR', dpdk_source_root) +cdata.set('STRIP_FROM_PATH', ' '.join([dpdk_source_root, join_paths(dpdk_build_root, 'doc', 'api')])) doxy_conf = configure_file(input: 'doxy-api.conf.in', output: 'doxy-api.conf', diff --git a/kernel/freebsd/meson.build b/kernel/freebsd/meson.build index dc156a43fd..bc97d784c5 100644 --- a/kernel/freebsd/meson.build +++ b/kernel/freebsd/meson.build @@ -9,8 +9,8 @@ kmods = ['contigmem', 'nic_uio'] # right now, which allows us to simplify things. We pull in the sourcer # files from the individual meson.build files, and then use a custom # target to call make, passing in the values as env parameters. -kmod_cflags = ['-I' + meson.build_root(), - '-I' + join_paths(meson.source_root(), 'config'), +kmod_cflags = ['-I' + dpdk_build_root, + '-I' + join_paths(dpdk_source_root, 'config'), '-include rte_config.h'] # to avoid warnings due to race conditions with creating the dev_if.h, etc. diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build index 679fdf4f51..facc6d8a69 100644 --- a/kernel/linux/kni/meson.build +++ b/kernel/linux/kni/meson.build @@ -28,10 +28,10 @@ custom_target('rte_kni', 'M=' + meson.current_build_dir(), 'src=' + meson.current_source_dir(), ' '.join(['MODULE_CFLAGS=', kmod_cflags,'-include ']) - + meson.source_root() + '/config/rte_config.h' + - ' -I' + meson.source_root() + '/lib/librte_eal/common/include' + - ' -I' + meson.source_root() + '/lib/librte_eal/linux/eal/include' + - ' -I' + meson.build_root() + + + dpdk_source_root + '/config/rte_config.h' + + ' -I' + dpdk_source_root + '/lib/librte_eal/common/include' + + ' -I' + dpdk_source_root + '/lib/librte_eal/linux/eal/include' + + ' -I' + dpdk_build_root + ' -I' + meson.current_source_dir(), 'modules'], depends: kni_mkfile, diff --git a/meson.build b/meson.build index 00ebbef115..a32bcda1c9 100644 --- a/meson.build +++ b/meson.build @@ -17,6 +17,8 @@ project('DPDK', 'C', # set up some global vars for compiler, platform, configuration, etc. cc = meson.get_compiler('c') +dpdk_source_root = meson.current_source_dir() +dpdk_build_root = meson.current_build_dir() dpdk_conf = configuration_data() dpdk_libraries = [] dpdk_static_libraries = [] -- 2.32.0