summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/meson.build2
-rw-r--r--buildtools/meson.build2
-rw-r--r--config/meson.build14
-rw-r--r--config/x86/meson.build2
-rw-r--r--doc/guides/contributing/coding_style.rst2
-rw-r--r--drivers/bus/dpaa/meson.build2
-rw-r--r--drivers/bus/fslmc/meson.build2
-rw-r--r--drivers/bus/pci/meson.build2
-rw-r--r--drivers/bus/vmbus/meson.build2
-rw-r--r--drivers/common/dpaax/meson.build2
-rw-r--r--drivers/crypto/caam_jr/meson.build2
-rw-r--r--drivers/crypto/ccp/meson.build2
-rw-r--r--drivers/crypto/dpaa2_sec/meson.build2
-rw-r--r--drivers/crypto/dpaa_sec/meson.build2
-rw-r--r--drivers/crypto/octeontx/meson.build2
-rw-r--r--drivers/event/dpaa/meson.build2
-rw-r--r--drivers/event/dpaa2/meson.build2
-rw-r--r--drivers/mempool/dpaa/meson.build2
-rw-r--r--drivers/mempool/dpaa2/meson.build2
-rw-r--r--drivers/meson.build2
-rw-r--r--drivers/net/af_packet/meson.build2
-rw-r--r--drivers/net/avp/meson.build2
-rw-r--r--drivers/net/axgbe/meson.build2
-rw-r--r--drivers/net/dpaa/meson.build2
-rw-r--r--drivers/net/dpaa2/meson.build2
-rw-r--r--drivers/net/enetc/meson.build2
-rw-r--r--drivers/net/failsafe/meson.build2
-rw-r--r--drivers/net/nfp/meson.build2
-rw-r--r--drivers/net/softnic/meson.build2
-rw-r--r--drivers/net/tap/meson.build2
-rw-r--r--drivers/net/vdev_netvsc/meson.build2
-rw-r--r--drivers/net/virtio/meson.build2
-rw-r--r--examples/l3fwd-power/meson.build2
-rw-r--r--examples/meson.build2
-rw-r--r--examples/tep_termination/meson.build2
-rw-r--r--examples/vdpa/meson.build4
-rw-r--r--examples/vhost/meson.build2
-rw-r--r--examples/vhost_scsi/meson.build2
-rw-r--r--kernel/meson.build2
-rw-r--r--lib/librte_eventdev/meson.build2
-rw-r--r--lib/librte_kni/meson.build2
-rw-r--r--lib/librte_power/meson.build2
-rw-r--r--lib/librte_vhost/meson.build2
-rw-r--r--lib/meson.build4
44 files changed, 55 insertions, 49 deletions
diff --git a/app/meson.build b/app/meson.build
index e949624..2b9fdef 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017-2019 Intel Corporation
-if host_machine.system() == 'windows'
+if is_windows
subdir_done()
endif
diff --git a/buildtools/meson.build b/buildtools/meson.build
index 0209bec..0d3a42c 100644
--- a/buildtools/meson.build
+++ b/buildtools/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017-2019 Intel Corporation
-if host_machine.system() == 'windows'
+if is_windows
subdir_done()
endif
diff --git a/config/meson.build b/config/meson.build
index ce6af25..f8aded6 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -8,6 +8,12 @@ if not supported_exec_envs.contains(exec_env)
error('unsupported system type "@0@"'.format(exec_env))
endif
+# define a handy variable for checking which OS we have.
+# gives us "is_windows", "is_freebsd" and "is_linux"
+foreach env:supported_exec_envs
+ set_variable('is_' + env, exec_env == env)
+endforeach
+
# set the major version, which might be used by drivers and libraries
# depending on the configuration options
pver = meson.project_version().split('.')
@@ -95,9 +101,9 @@ if cc.find_library('libm', required : false).found()
endif
# for linux link against dl, for bsd execinfo
-if host_machine.system() == 'linux'
+if is_linux
link_lib = 'dl'
-elif host_machine.system() == 'freebsd'
+elif is_freebsd
link_lib = 'execinfo'
else
link_lib = ''
@@ -120,7 +126,7 @@ if numa_dep.found() and cc.has_header('numaif.h')
endif
# check for strlcpy
-if host_machine.system() == 'linux'
+if is_linux
libbsd = dependency('libbsd', required: false)
if libbsd.found()
dpdk_conf.set('RTE_USE_LIBBSD', 1)
@@ -175,4 +181,4 @@ dpdk_conf.set_quoted('RTE_EAL_PMD_PATH', eal_pmd_path)
install_headers('rte_config.h', subdir: get_option('include_subdir_arch'))
# enable VFIO only if it is linux OS
-dpdk_conf.set('RTE_EAL_VFIO', host_machine.system() == 'linux')
+dpdk_conf.set('RTE_EAL_VFIO', is_linux)
diff --git a/config/x86/meson.build b/config/x86/meson.build
index 558edfd..2b2d062 100644
--- a/config/x86/meson.build
+++ b/config/x86/meson.build
@@ -5,7 +5,7 @@
march_opt = ['-march=@0@'.format(machine)]
# get binutils version for the workaround of Bug 97
-if host_machine.system() != 'windows'
+if not is_windows
ldver = run_command('ld', '-v').stdout().strip()
if ldver.contains('2.30')
if cc.has_argument('-mno-avx512f')
diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
index 656563d..a5d5897 100644
--- a/doc/guides/contributing/coding_style.rst
+++ b/doc/guides/contributing/coding_style.rst
@@ -856,7 +856,7 @@ build
.. code-block:: python
- if host_machine.system() != 'linux'
+ if not is_linux
build = false
endif
diff --git a/drivers/bus/dpaa/meson.build b/drivers/bus/dpaa/meson.build
index 1fcb4e9..1c8ca8c 100644
--- a/drivers/bus/dpaa/meson.build
+++ b/drivers/bus/dpaa/meson.build
@@ -3,7 +3,7 @@
version = 2
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
diff --git a/drivers/bus/fslmc/meson.build b/drivers/bus/fslmc/meson.build
index 4b05215..04624c3 100644
--- a/drivers/bus/fslmc/meson.build
+++ b/drivers/bus/fslmc/meson.build
@@ -3,7 +3,7 @@
version = 2
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
diff --git a/drivers/bus/pci/meson.build b/drivers/bus/pci/meson.build
index a3140ff..a312ecc 100644
--- a/drivers/bus/pci/meson.build
+++ b/drivers/bus/pci/meson.build
@@ -8,7 +8,7 @@ install_headers('rte_bus_pci.h')
sources = files('pci_common.c',
'pci_common_uio.c',
'pci_params.c')
-if host_machine.system() == 'linux'
+if is_linux
sources += files('linux/pci.c',
'linux/pci_uio.c',
'linux/pci_vfio.c')
diff --git a/drivers/bus/vmbus/meson.build b/drivers/bus/vmbus/meson.build
index 0e4d058..9fd430d 100644
--- a/drivers/bus/vmbus/meson.build
+++ b/drivers/bus/vmbus/meson.build
@@ -11,7 +11,7 @@ sources = files('vmbus_common.c',
'vmbus_bufring.c',
'vmbus_common_uio.c')
-if host_machine.system() == 'linux'
+if is_linux
sources += files('linux/vmbus_bus.c',
'linux/vmbus_uio.c')
includes += include_directories('linux')
diff --git a/drivers/common/dpaax/meson.build b/drivers/common/dpaax/meson.build
index 98a1bdd..78378e2 100644
--- a/drivers/common/dpaax/meson.build
+++ b/drivers/common/dpaax/meson.build
@@ -3,7 +3,7 @@
allow_experimental_apis = true
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
diff --git a/drivers/crypto/caam_jr/meson.build b/drivers/crypto/caam_jr/meson.build
index 99b71ae..e61a13c 100644
--- a/drivers/crypto/caam_jr/meson.build
+++ b/drivers/crypto/caam_jr/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018 NXP
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
diff --git a/drivers/crypto/ccp/meson.build b/drivers/crypto/ccp/meson.build
index 915c4c8..071ccc5 100644
--- a/drivers/crypto/ccp/meson.build
+++ b/drivers/crypto/ccp/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Advanced Micro Devices, Inc. All rights reserved.
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
dep = dependency('libcrypto', required: false)
diff --git a/drivers/crypto/dpaa2_sec/meson.build b/drivers/crypto/dpaa2_sec/meson.build
index 8fa4827..d197cda 100644
--- a/drivers/crypto/dpaa2_sec/meson.build
+++ b/drivers/crypto/dpaa2_sec/meson.build
@@ -3,7 +3,7 @@
version = 2
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
diff --git a/drivers/crypto/dpaa_sec/meson.build b/drivers/crypto/dpaa_sec/meson.build
index 8a57098..134af88 100644
--- a/drivers/crypto/dpaa_sec/meson.build
+++ b/drivers/crypto/dpaa_sec/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018 NXP
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
diff --git a/drivers/crypto/octeontx/meson.build b/drivers/crypto/octeontx/meson.build
index 423737e..a9f2d31 100644
--- a/drivers/crypto/octeontx/meson.build
+++ b/drivers/crypto/octeontx/meson.build
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Cavium, Inc
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
diff --git a/drivers/event/dpaa/meson.build b/drivers/event/dpaa/meson.build
index 0914f85..11b1fe6 100644
--- a/drivers/event/dpaa/meson.build
+++ b/drivers/event/dpaa/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018 NXP
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
deps += ['pmd_dpaa']
diff --git a/drivers/event/dpaa2/meson.build b/drivers/event/dpaa2/meson.build
index a0db6fc..a94bc56 100644
--- a/drivers/event/dpaa2/meson.build
+++ b/drivers/event/dpaa2/meson.build
@@ -3,7 +3,7 @@
version = 2
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
deps += ['bus_vdev', 'pmd_dpaa2', 'pmd_dpaa2_sec']
diff --git a/drivers/mempool/dpaa/meson.build b/drivers/mempool/dpaa/meson.build
index 9163b3d..c4c8ebc 100644
--- a/drivers/mempool/dpaa/meson.build
+++ b/drivers/mempool/dpaa/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018 NXP
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
diff --git a/drivers/mempool/dpaa2/meson.build b/drivers/mempool/dpaa2/meson.build
index 6b6ead6..9a8b28d 100644
--- a/drivers/mempool/dpaa2/meson.build
+++ b/drivers/mempool/dpaa2/meson.build
@@ -3,7 +3,7 @@
version = 2
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
diff --git a/drivers/meson.build b/drivers/meson.build
index 7520a16..4c444f4 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017-2019 Intel Corporation
-if host_machine.system() == 'windows'
+if is_windows
subdir_done()
endif
diff --git a/drivers/net/af_packet/meson.build b/drivers/net/af_packet/meson.build
index 92f6a97..92c306c 100644
--- a/drivers/net/af_packet/meson.build
+++ b/drivers/net/af_packet/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
sources = files('rte_eth_af_packet.c')
diff --git a/drivers/net/avp/meson.build b/drivers/net/avp/meson.build
index b7ffdfc..8138cb2 100644
--- a/drivers/net/avp/meson.build
+++ b/drivers/net/avp/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
sources = files('avp_ethdev.c')
diff --git a/drivers/net/axgbe/meson.build b/drivers/net/axgbe/meson.build
index 548ffff..6decb25 100644
--- a/drivers/net/axgbe/meson.build
+++ b/drivers/net/axgbe/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved.
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
diff --git a/drivers/net/dpaa/meson.build b/drivers/net/dpaa/meson.build
index 62dec7b..8e5418b 100644
--- a/drivers/net/dpaa/meson.build
+++ b/drivers/net/dpaa/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018 NXP
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
deps += ['mempool_dpaa']
diff --git a/drivers/net/dpaa2/meson.build b/drivers/net/dpaa2/meson.build
index 53e1d81..a0ea992 100644
--- a/drivers/net/dpaa2/meson.build
+++ b/drivers/net/dpaa2/meson.build
@@ -3,7 +3,7 @@
version = 2
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
diff --git a/drivers/net/enetc/meson.build b/drivers/net/enetc/meson.build
index 733156b..7d0c2ff 100644
--- a/drivers/net/enetc/meson.build
+++ b/drivers/net/enetc/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018 NXP
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
diff --git a/drivers/net/failsafe/meson.build b/drivers/net/failsafe/meson.build
index a249ff4..dfd4067 100644
--- a/drivers/net/failsafe/meson.build
+++ b/drivers/net/failsafe/meson.build
@@ -5,7 +5,7 @@ cflags += '-std=gnu99'
cflags += '-D_DEFAULT_SOURCE'
cflags += '-D_XOPEN_SOURCE=700'
cflags += '-pedantic'
-if host_machine.system() == 'linux'
+if is_linux
cflags += '-DLINUX'
else
cflags += '-DBSD'
diff --git a/drivers/net/nfp/meson.build b/drivers/net/nfp/meson.build
index ba6a22e..ea51ac3 100644
--- a/drivers/net/nfp/meson.build
+++ b/drivers/net/nfp/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
sources = files('nfpcore/nfp_cpp_pcie_ops.c',
diff --git a/drivers/net/softnic/meson.build b/drivers/net/softnic/meson.build
index da249c0..dd1d610 100644
--- a/drivers/net/softnic/meson.build
+++ b/drivers/net/softnic/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
allow_experimental_apis = true
diff --git a/drivers/net/tap/meson.build b/drivers/net/tap/meson.build
index 9cb7142..c407a1f 100644
--- a/drivers/net/tap/meson.build
+++ b/drivers/net/tap/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018 Luca Boccassi <bluca@debian.org>
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
sources = files(
diff --git a/drivers/net/vdev_netvsc/meson.build b/drivers/net/vdev_netvsc/meson.build
index d3ada87..6655859 100644
--- a/drivers/net/vdev_netvsc/meson.build
+++ b/drivers/net/vdev_netvsc/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
sources = files('vdev_netvsc.c')
diff --git a/drivers/net/virtio/meson.build b/drivers/net/virtio/meson.build
index e43ce6b..7949054 100644
--- a/drivers/net/virtio/meson.build
+++ b/drivers/net/virtio/meson.build
@@ -15,7 +15,7 @@ elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
sources += files('virtio_rxtx_simple_neon.c')
endif
-if host_machine.system() == 'linux'
+if is_linux
dpdk_conf.set('RTE_VIRTIO_USER', 1)
sources += files('virtio_user_ethdev.c',
diff --git a/examples/l3fwd-power/meson.build b/examples/l3fwd-power/meson.build
index a3c5c2f..2c84123 100644
--- a/examples/l3fwd-power/meson.build
+++ b/examples/l3fwd-power/meson.build
@@ -6,7 +6,7 @@
# To build this example as a standalone application with an already-installed
# DPDK instance, use 'make'
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
allow_experimental_apis = true
diff --git a/examples/meson.build b/examples/meson.build
index d72382f..e4babf6 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -36,7 +36,7 @@ foreach example: examples
ext_deps = [execinfo]
includes = [include_directories(example)]
deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline']
- if host_machine.system() == 'windows'
+ if is_windows
deps = ['eal'] # only supported lib on Windows currently
endif
subdir(example)
diff --git a/examples/tep_termination/meson.build b/examples/tep_termination/meson.build
index 6d36362..a75cc71 100644
--- a/examples/tep_termination/meson.build
+++ b/examples/tep_termination/meson.build
@@ -6,7 +6,7 @@
# To build this example as a standalone application with an already-installed
# DPDK instance, use 'make'
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
deps += ['hash', 'vhost']
diff --git a/examples/vdpa/meson.build b/examples/vdpa/meson.build
index 2e38a06..73f129c 100644
--- a/examples/vdpa/meson.build
+++ b/examples/vdpa/meson.build
@@ -6,11 +6,11 @@
# To build this example as a standalone application with an already-installed
# DPDK instance, use 'make'
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
deps += 'vhost'
allow_experimental_apis = true
sources = files(
'main.c'
-) \ No newline at end of file
+)
diff --git a/examples/vhost/meson.build b/examples/vhost/meson.build
index 7b49807..872d511 100644
--- a/examples/vhost/meson.build
+++ b/examples/vhost/meson.build
@@ -6,7 +6,7 @@
# To build this example as a standalone application with an already-installed
# DPDK instance, use 'make'
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
deps += 'vhost'
diff --git a/examples/vhost_scsi/meson.build b/examples/vhost_scsi/meson.build
index ca12480..2e9339a 100644
--- a/examples/vhost_scsi/meson.build
+++ b/examples/vhost_scsi/meson.build
@@ -6,7 +6,7 @@
# To build this example as a standalone application with an already-installed
# DPDK instance, use 'make'
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
diff --git a/kernel/meson.build b/kernel/meson.build
index 2c8fa76..b247e2d 100644
--- a/kernel/meson.build
+++ b/kernel/meson.build
@@ -1,4 +1,4 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-subdir(host_machine.system())
+subdir(exec_env)
diff --git a/lib/librte_eventdev/meson.build b/lib/librte_eventdev/meson.build
index 6becfe8..6cfe60e 100644
--- a/lib/librte_eventdev/meson.build
+++ b/lib/librte_eventdev/meson.build
@@ -4,7 +4,7 @@
version = 6
allow_experimental_apis = true
-if host_machine.system() == 'linux'
+if is_linux
cflags += '-DLINUX'
else
cflags += '-DBSD'
diff --git a/lib/librte_kni/meson.build b/lib/librte_kni/meson.build
index 055ae12..400af9a 100644
--- a/lib/librte_kni/meson.build
+++ b/lib/librte_kni/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if host_machine.system() != 'linux' or not dpdk_conf.get('RTE_ARCH_64')
+if not is_linux or not dpdk_conf.get('RTE_ARCH_64')
build = false
endif
version = 2
diff --git a/lib/librte_power/meson.build b/lib/librte_power/meson.build
index 02e0337..cc6c300 100644
--- a/lib/librte_power/meson.build
+++ b/lib/librte_power/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
sources = files('rte_power.c', 'power_acpi_cpufreq.c',
diff --git a/lib/librte_vhost/meson.build b/lib/librte_vhost/meson.build
index e33e6fc..3090bbe 100644
--- a/lib/librte_vhost/meson.build
+++ b/lib/librte_vhost/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017-2018 Intel Corporation
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
if has_libnuma == 1
diff --git a/lib/meson.build b/lib/meson.build
index 595314d..a379dd6 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -30,7 +30,7 @@ libraries = [
# flow_classify lib depends on pkt framework table lib
'flow_classify', 'bpf', 'telemetry']
-if host_machine.system() == 'windows'
+if is_windows
libraries = ['kvargs','eal'] # only supported libraries for windows
endif
@@ -123,7 +123,7 @@ foreach l:libraries
meson.current_source_dir(), dir_name, name)
exports = []
implib = dir_name + '.dll.a'
- if host_machine.system() == 'windows'
+ if is_windows
exports = '@0@/@1@/rte_@2@_exports.def'.format(
meson.current_source_dir(), dir_name, name)
lk_args = ['-Wl,/def:' + exports, '-Wl,/implib:lib\\' + implib]