DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-dev] [RFC PATCH 2/3] build: shorten top-level build file
Date: Thu, 22 Oct 2020 15:59:43 +0100	[thread overview]
Message-ID: <20201022145944.470054-3-bruce.richardson@intel.com> (raw)
In-Reply-To: <20201022145944.470054-1-bruce.richardson@intel.com>

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@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


  parent reply	other threads:[~2020-10-22 15:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22 14:59 [dpdk-dev] [RFC PATCH 0/3] add custom logging to DPDK meson runs Bruce Richardson
2020-10-22 14:59 ` [dpdk-dev] [RFC PATCH 1/3] build: add a dpdk-specific meson log file Bruce Richardson
2020-10-22 14:59 ` Bruce Richardson [this message]
2020-10-22 14:59 ` [dpdk-dev] [RFC PATCH 3/3] build: write messages to dpdk build " Bruce Richardson
2021-09-15 16:23 ` [dpdk-dev] [RFC PATCH 0/3] add custom logging to DPDK meson runs Bruce Richardson
2021-09-17 13:36   ` Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201022145944.470054-3-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).