build: replace meson OS detection with variable
Subsystems (3)
PATCH 1/1 build: replace meson OS detection with variable
Some places were calling the meson function host_machine.system() instead of the variables is_windows and is_linux defined in config/meson.build.
--- buildtools/pmdinfogen/meson.build | 2 +- drivers/crypto/octeontx2/meson.build | 2 +- drivers/net/pfe/meson.build | 2 +- examples/ntb/meson.build | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
buildtools/pmdinfogen/meson.build +1 -1
@@ -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
drivers/crypto/octeontx2/meson.build +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright (C) 2019 Marvell International Ltd. -if host_machine.system() != 'linux' +if not is_linux build = false endif
drivers/net/pfe/meson.build +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright 2019 NXP -if host_machine.system() != 'linux' +if not is_linux build = false endif deps += ['common_dpaax']
examples/ntb/meson.build +1 -1
@@ -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'
Signature · 1 line
2.26.2
Quoted 5 lines · Thomas Monjalon
Some places were calling the meson function
host_machine.system()instead of the variablesis_windowsandis_linuxdefined in config/meson.build.Signed-off-by Thomas Monjalon <[email protected]>
though while changing this it would be good if you could take care of the one additional comment below also.
Quoted 25 lines
--- buildtools/pmdinfogen/meson.build | 2 +- drivers/crypto/octeontx2/meson.build | 2 +- drivers/net/pfe/meson.build | 2 +- examples/ntb/meson.build | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)buildtools/pmdinfogen/meson.build +1
-1@@ -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() endifdrivers/crypto/octeontx2/meson.build +0
-0
drivers/crypto/octeontx2/meson.build line 7
Quoted 8 lines
drivers/crypto/octeontx2/meson.build +1
-1@@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright (C) 2019 Marvell International Ltd. -if host_machine.system() != 'linux' +if not is_linux build = false endif
This and the other instances below should also set "reason" variable so we get in the output log at the end why they are not being built. Generally drivers copy-paste this line:
reason = 'only supported on Linux'
Quoted 29 lines
drivers/net/pfe/meson.build +1
-1@@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright 2019 NXP -if host_machine.system() != 'linux' +if not is_linux build = false endif deps += ['common_dpaax']examples/ntb/meson.build +1
-1@@ -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'Signature · 1 line
2.26.2
PATCH v2 1/1 build: replace meson OS detection with variable
In reply to Thomas MonjalonSome 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.
---
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(-)
buildtools/pmdinfogen/meson.build +1 -1
@@ -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
drivers/crypto/octeontx2/meson.build +3 -2
@@ -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']
drivers/net/pfe/meson.build +2 -1
@@ -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']
examples/ntb/meson.build +1 -1
@@ -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'
Signature · 1 line
2.26.2
Quoted 4 lines · Thomas Monjalon
Some places were calling the meson function
host_machine.system()instead of the variablesis_windowsandis_linuxdefined in config/meson.build.
Quoted 8 lines
At the same time, the missing "Linux restriction" reason is added to pfe and octeontx2 crypto PMDs.
Signed-off-by Thomas Monjalon <[email protected]>Acked-by Bruce Richardson <[email protected]>---
v2: add missing reason to drivers
---
Thanks LGTM.
Quoted 10 lines
Some places were calling the meson function
host_machine.system()instead of the variablesis_windowsandis_linuxdefined 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 <[email protected]>Acked-by Bruce Richardson <[email protected]>---
Thomas Monjalon
Applied30/06/2020 15:28, Akhil Goyal:
Quoted 11 lines
Quoted 10 lines
Some places were calling the meson function
host_machine.system()instead of the variablesis_windowsandis_linuxdefined 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 <[email protected]>Acked-by Bruce Richardson <[email protected]>---
Acked-by Akhil Goyal <[email protected]>
Applied
Quoted 8 lines
Some places were calling the meson function
host_machine.system()instead of the variablesis_windowsandis_linuxdefined 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 <[email protected]>Acked-by Bruce Richardson <[email protected]>