From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 3AE6EA057C;
	Fri, 27 Mar 2020 02:17:08 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 5A5071C037;
	Fri, 27 Mar 2020 02:16:57 +0100 (CET)
Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com
 [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 8584D3B5
 for <dev@dpdk.org>; Fri, 27 Mar 2020 02:16:55 +0100 (CET)
Received: from compute7.internal (compute7.nyi.internal [10.202.2.47])
 by mailout.nyi.internal (Postfix) with ESMTP id 38EEB5C01CF;
 Thu, 26 Mar 2020 21:16:55 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute7.internal (MEProxy); Thu, 26 Mar 2020 21:16:55 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding; s=mesmtp; bh=B8LAQjHkkx
 y83FZ4Q4oV91YoiaDNz2/E51ngIPGD97I=; b=ArxqGROSTimEtsY/q8YeUaTReB
 Rp+TgXNp2AjrYz4QRfDKLxok0JkFEcDAtB1/TnE3Z9Og6wMkfpBTb/Hz5YE3uhNJ
 i4IkLrKAfeNLoFix3xCk1BI/4wipIhgJx5tl9eIvw0iKhtlzxEhreJqMCd2wgyAi
 olb3tdx7xgtSsmrhk=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:date:from
 :in-reply-to:message-id:mime-version:references:subject:to
 :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=
 fm2; bh=B8LAQjHkkxy83FZ4Q4oV91YoiaDNz2/E51ngIPGD97I=; b=Btmw29Lt
 9b+PCI+GwTOwOhNRCxGuRRW0kz6ODuLWT34swHmN1ucHo63k1H1wET2XqzzKdMar
 c9qRFdzuo1oV8cccboasit2Kbm+eOexsyCasJRFaRjzqt5kgBlQXrMqNGr+zXUZK
 xQPECf8JoQFxD8Bf3M3Bo8TXjUUoP6ev49K9inws2T6r5jNS5xi9/TMwu7gJsApB
 3/oOypSZpR4Pxf0mPlFKv092zqXwitXG3BBLrfWYQ9bbaNlQ1kun5Wz6+HBE+H3+
 WP3e8JrNrT53i6K2+Fncpxvd3xzWBD830SztphJUwfCigILqmBylau2Ooh7sqtZ8
 yzMagysIzDV2uQ==
X-ME-Sender: <xms:BlR9XslXYhFCfZAnjfc-d7NLg85YdwAngFNIuEB0EAIlcVXIUvG19w>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudehjedgudefudcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhm
 rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc
 fkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfr
 rghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth
X-ME-Proxy: <xmx:BlR9XjTu267oEWC-LkH_uAOLmhIgIn4wAyEvRuCD41wnfLLL_5yq3w>
 <xmx:BlR9XoAsFfAKbqEjA1ScDFp-o6kng9LJLXy9y13rbdL7pCOvzCeksA>
 <xmx:BlR9XiR2yS2IM_ZZfuMkTpWSsNcBHNFs4xzdl6lxADSqP495BzZEsg>
 <xmx:B1R9XowltLCSfXdOLbg7B-xGwFwvgcwxwHIh7amXfy7MRF3zYjbfkg>
Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 30266306AC3D;
 Thu, 26 Mar 2020 21:16:54 -0400 (EDT)
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>
Date: Fri, 27 Mar 2020 02:15:37 +0100
Message-Id: <20200327011540.954014-6-thomas@monjalon.net>
X-Mailer: git-send-email 2.25.1
In-Reply-To: <20200327011540.954014-1-thomas@monjalon.net>
References: <20200320001220.150235-1-thomas@monjalon.net>
 <20200327011540.954014-1-thomas@monjalon.net>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [dpdk-dev] [PATCH v2 5/8] eal: simplify meson build of common
	directory
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

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