[dpdk-dev] [RFC PATCH 2/3] build: shorten top-level build file
Bruce Richardson
bruce.richardson at intel.com
Thu Oct 22 16:59:43 CEST 2020
Move some basic configuration settings out of the top-level meson.build
file to the "config/meson.build" file, so as to keep the top-level file as
clear and as short as possible.
Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
config/meson.build | 18 ++++++++++++++++++
meson.build | 17 -----------------
2 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/config/meson.build b/config/meson.build
index 258b01d06..10643fdeb 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -14,6 +14,24 @@ foreach env:supported_exec_envs
set_variable('is_' + env, exec_env == env)
endforeach
+# set the basic ISA
+if host_machine.cpu_family().startswith('x86')
+ arch_subdir = 'x86'
+elif host_machine.cpu_family().startswith('arm') or host_machine.cpu_family().startswith('aarch')
+ arch_subdir = 'arm'
+elif host_machine.cpu_family().startswith('ppc')
+ arch_subdir = 'ppc'
+endif
+
+# configure the build, and make sure configs here and in root folder are
+# able to be included in any file. We also store a global array of include dirs
+# for passing to pmdinfogen scripts
+global_inc = include_directories('.', '..',
+ '../lib/librte_eal/include',
+ '../lib/librte_eal/@0@/include'.format(host_machine.system()),
+ '../lib/librte_eal/@0@/include'.format(arch_subdir),
+)
+
# MS linker requires special treatment.
# TODO: use cc.get_linker_id() with Meson >= 0.54
is_ms_linker = is_windows and (cc.get_id() == 'clang')
diff --git a/meson.build b/meson.build
index ab950a2ce..8333d264f 100644
--- a/meson.build
+++ b/meson.build
@@ -28,23 +28,6 @@ dpdk_libs_disabled = []
dpdk_drvs_disabled = []
abi_version_file = files('ABI_VERSION')
-if host_machine.cpu_family().startswith('x86')
- arch_subdir = 'x86'
-elif host_machine.cpu_family().startswith('arm') or host_machine.cpu_family().startswith('aarch')
- arch_subdir = 'arm'
-elif host_machine.cpu_family().startswith('ppc')
- arch_subdir = 'ppc'
-endif
-
-# configure the build, and make sure configs here and in config folder are
-# able to be included in any file. We also store a global array of include dirs
-# for passing to pmdinfogen scripts
-global_inc = include_directories('.', 'config',
- 'lib/librte_eal/include',
- 'lib/librte_eal/@0@/include'.format(host_machine.system()),
- 'lib/librte_eal/@0@/include'.format(arch_subdir),
-)
-
# do main build config
subdir('config')
--
2.25.1
More information about the dev
mailing list