summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorBruce Richardson <bruce.richardson@intel.com>2019-04-09 11:55:36 +0100
committerThomas Monjalon <thomas@monjalon.net>2019-04-17 18:09:52 +0200
commitadf93ca564c73183e1c705cd7f35b98f3a660228 (patch)
tree43da96af2eb274a918071d2931ddfdab1b87a390 /drivers/net
parentb458c2927ab416fd7becfbc740ccfa53f0dfbdd1 (diff)
downloaddpdk-adf93ca564c73183e1c705cd7f35b98f3a660228.zip
dpdk-adf93ca564c73183e1c705cd7f35b98f3a660228.tar.gz
dpdk-adf93ca564c73183e1c705cd7f35b98f3a660228.tar.xz
build: increase readability via shortcut variables
Define variables for "is_linux", "is_freebsd" and "is_windows" to make the code shorter for comparisons and more readable. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: David Marchand <david.marchand@redhat.com> Acked-by: Luca Boccassi <bluca@debian.org>
Diffstat (limited to 'drivers/net')
-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
12 files changed, 12 insertions, 12 deletions
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',