diff mbox series

[v2] build: replace meson OS detection with variable

Message ID 20200630131523.1285693-1-thomas@monjalon.net (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers show
Series [v2] build: replace meson OS detection with variable | expand

Checks

Context Check Description
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation fail apply issues
ci/iol-broadcom-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/Performance-Testing fail build patch failure
ci/checkpatch success coding style OK

Commit Message

Thomas Monjalon June 30, 2020, 1:15 p.m. UTC
Some places were calling the meson function host_machine.system()
instead of the variables is_windows and is_linux defined
in config/meson.build.

At the same time, the missing "Linux restriction" reason is added to
pfe and octeontx2 crypto PMDs.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
v2: add missing reason to drivers
---
 buildtools/pmdinfogen/meson.build    | 2 +-
 drivers/crypto/octeontx2/meson.build | 5 +++--
 drivers/net/pfe/meson.build          | 3 ++-
 examples/ntb/meson.build             | 2 +-
 4 files changed, 7 insertions(+), 5 deletions(-)

Comments

Bruce Richardson June 30, 2020, 1:23 p.m. UTC | #1
On Tue, Jun 30, 2020 at 03:15:22PM +0200, Thomas Monjalon wrote:
> Some places were calling the meson function host_machine.system()
> instead of the variables is_windows and is_linux defined
> in config/meson.build.
> 
> At the same time, the missing "Linux restriction" reason is added to
> pfe and octeontx2 crypto PMDs.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> v2: add missing reason to drivers
> ---
Thanks LGTM.
Akhil Goyal June 30, 2020, 1:28 p.m. UTC | #2
> Some places were calling the meson function host_machine.system()
> instead of the variables is_windows and is_linux defined
> in config/meson.build.
> 
> At the same time, the missing "Linux restriction" reason is added to
> pfe and octeontx2 crypto PMDs.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Thomas Monjalon June 30, 2020, 1:32 p.m. UTC | #3
30/06/2020 15:28, Akhil Goyal:
> > Some places were calling the meson function host_machine.system()
> > instead of the variables is_windows and is_linux defined
> > in config/meson.build.
> > 
> > At the same time, the missing "Linux restriction" reason is added to
> > pfe and octeontx2 crypto PMDs.
> > 
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

Applied
Anoob Joseph July 1, 2020, 4:05 a.m. UTC | #4
> Some places were calling the meson function host_machine.system() instead of
> the variables is_windows and is_linux defined in config/meson.build.
> 
> At the same time, the missing "Linux restriction" reason is added to pfe and
> octeontx2 crypto PMDs.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Acked-by: Anoob Joseph <anoobj@marvell.com>
diff mbox series

Patch

diff --git a/buildtools/pmdinfogen/meson.build b/buildtools/pmdinfogen/meson.build
index 7da415b3b7..670528fac7 100644
--- a/buildtools/pmdinfogen/meson.build
+++ b/buildtools/pmdinfogen/meson.build
@@ -1,7 +1,7 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-if host_machine.system() == 'windows'
+if is_windows
 	subdir_done()
 endif
 
diff --git a/drivers/crypto/octeontx2/meson.build b/drivers/crypto/octeontx2/meson.build
index a28c700b9f..0948e73607 100644
--- a/drivers/crypto/octeontx2/meson.build
+++ b/drivers/crypto/octeontx2/meson.build
@@ -1,8 +1,9 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright (C) 2019 Marvell International Ltd.
 
-if host_machine.system() != 'linux'
-        build = false
+if not is_linux
+	build = false
+	reason = 'only supported on Linux'
 endif
 
 deps += ['bus_pci']
diff --git a/drivers/net/pfe/meson.build b/drivers/net/pfe/meson.build
index 3e1a228a3f..da0787c28c 100644
--- a/drivers/net/pfe/meson.build
+++ b/drivers/net/pfe/meson.build
@@ -1,8 +1,9 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2019 NXP
 
-if host_machine.system() != 'linux'
+if not is_linux
 	build = false
+	reason = 'only supported on Linux'
 endif
 deps += ['common_dpaax']
 
diff --git a/examples/ntb/meson.build b/examples/ntb/meson.build
index ab449d0939..45a59350c5 100644
--- a/examples/ntb/meson.build
+++ b/examples/ntb/meson.build
@@ -7,7 +7,7 @@ 
 # DPDK instance, use 'make'
 
 allow_experimental_apis = true
-if host_machine.system() != 'linux'
+if not is_linux
 	build = false
 endif
 deps += 'rawdev'