DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: david.marchand@redhat.com,
	Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>,
	Omar Cardona <ocardona@microsoft.com>,
	Pallavi Kadam <pallavi.kadam@intel.com>,
	Ranjit Menon <ranjit.menon@intel.com>
Subject: [dpdk-dev] [PATCH v2 5/8] eal: simplify meson build of common directory
Date: Fri, 27 Mar 2020 02:15:37 +0100	[thread overview]
Message-ID: <20200327011540.954014-6-thomas@monjalon.net> (raw)
In-Reply-To: <20200327011540.954014-1-thomas@monjalon.net>

The variable common_sources allows to change the list of common files
from an arch-specific or OS-specific meson file.
For consistency and least surprise principle, this variable is removed.
Now the list of common sources is defined only in common/meson.build.
As a consequence, the temporary list of files which are currently supported
on Windows, is moved from windows/eal/meson.build.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_eal/common/meson.build      | 20 +++++++++++++++++---
 lib/librte_eal/meson.build             |  6 +++---
 lib/librte_eal/windows/eal/meson.build | 12 ------------
 3 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build
index 94dfc5fe74..5885441b48 100644
--- a/lib/librte_eal/common/meson.build
+++ b/lib/librte_eal/common/meson.build
@@ -3,8 +3,21 @@
 
 eal_inc += include_directories('.', 'include')
 
-common_objs = []
-common_sources = files(
+if is_windows
+	sources += files(
+		'eal_common_bus.c',
+		'eal_common_class.c',
+		'eal_common_devargs.c',
+		'eal_common_errno.c',
+		'eal_common_launch.c',
+		'eal_common_lcore.c',
+		'eal_common_log.c',
+		'eal_common_options.c',
+		'eal_common_thread.c',
+		'rte_option.c',
+	)
+else # temporary bad indent
+sources += files(
 	'eal_common_bus.c',
 	'eal_common_cpuflags.c',
 	'eal_common_class.c',
@@ -37,8 +50,9 @@ common_sources = files(
 	'rte_option.c',
 	'rte_random.c',
 	'rte_reciprocal.c',
-	'rte_service.c'
+	'rte_service.c',
 )
+endif
 
 common_headers = files(
 	'include/rte_alarm.h',
diff --git a/lib/librte_eal/meson.build b/lib/librte_eal/meson.build
index 0c3d46574e..1fc532139b 100644
--- a/lib/librte_eal/meson.build
+++ b/lib/librte_eal/meson.build
@@ -5,7 +5,7 @@
 # have a straight list of headers and source files.
 # Initially pull in common settings
 eal_inc = [global_inc]
-subdir('common') # defines common_sources, common_objs, etc.
+subdir('common')
 
 # Now do OS/exec-env specific settings, including building kernel modules
 # The <exec-env>/eal/meson.build file should define env_sources, etc.
@@ -25,7 +25,7 @@ endif
 if cc.has_header('getopt.h')
 	cflags += ['-DHAVE_GETOPT_H', '-DHAVE_GETOPT', '-DHAVE_GETOPT_LONG']
 endif
-sources += common_sources + env_sources
-objs = common_objs + env_objs
+sources += env_sources
+objs = env_objs
 headers = common_headers + env_headers
 includes += eal_inc
diff --git a/lib/librte_eal/windows/eal/meson.build b/lib/librte_eal/windows/eal/meson.build
index 2a062c365e..46ccdb3343 100644
--- a/lib/librte_eal/windows/eal/meson.build
+++ b/lib/librte_eal/windows/eal/meson.build
@@ -7,18 +7,6 @@ env_objs = []
 env_headers = files(
 	'include/rte_os.h',
 )
-common_sources = files(
-	'../../common/eal_common_bus.c',
-	'../../common/eal_common_class.c',
-	'../../common/eal_common_devargs.c',
-	'../../common/eal_common_errno.c',
-	'../../common/eal_common_launch.c',
-	'../../common/eal_common_lcore.c',
-	'../../common/eal_common_log.c',
-	'../../common/eal_common_options.c',
-	'../../common/eal_common_thread.c',
-	'../../common/rte_option.c',
-)
 env_sources = files('eal.c',
 	'eal_debug.c',
 	'eal_lcore.c',
-- 
2.25.1


  parent reply	other threads:[~2020-03-27  1:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-20  0:12 [dpdk-dev] [PATCH] eal: reorganize directories layout Thomas Monjalon
2020-03-20  9:34 ` Bruce Richardson
2020-03-20 11:46   ` Thomas Monjalon
2020-03-27  1:15 ` [dpdk-dev] [PATCH v2 0/8] " Thomas Monjalon
2020-03-27  1:15   ` [dpdk-dev] [PATCH v2 1/8] eal: remove useless makefiles Thomas Monjalon
2020-03-27 12:05     ` Bruce Richardson
2020-03-27  1:15   ` [dpdk-dev] [PATCH v2 2/8] build: rename ppc sub-directories Thomas Monjalon
2020-03-27 17:49     ` David Christensen
2020-03-27  1:15   ` [dpdk-dev] [PATCH v2 3/8] eal: move arch-specific C files Thomas Monjalon
2020-03-27 17:46     ` David Christensen
2020-03-27  1:15   ` [dpdk-dev] [PATCH v2 4/8] eal: move arch-specific header files Thomas Monjalon
2020-03-27  2:39     ` Gavin Hu
2020-03-27 17:47     ` David Christensen
2020-03-27  1:15   ` Thomas Monjalon [this message]
2020-03-27  1:15   ` [dpdk-dev] [PATCH v2 6/8] eal: move common " Thomas Monjalon
2020-03-30 13:25     ` David Marchand
2020-03-27  1:15   ` [dpdk-dev] [PATCH v2 7/8] eal: move OS-specific sub-directories Thomas Monjalon
2020-03-27  1:15   ` [dpdk-dev] [PATCH v2 8/8] eal: clean make and meson files Thomas Monjalon
2020-03-27 14:47   ` [dpdk-dev] [PATCH v2 0/8] eal: reorganize directories layout Stephen Hemminger
2020-03-27 15:12     ` Thomas Monjalon
2020-03-30 14:22   ` David Marchand
2020-03-31 11:13     ` David Marchand

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=20200327011540.954014-6-thomas@monjalon.net \
    --to=thomas@monjalon.net \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=harini.ramakrishnan@microsoft.com \
    --cc=ocardona@microsoft.com \
    --cc=pallavi.kadam@intel.com \
    --cc=ranjit.menon@intel.com \
    /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).