summaryrefslogtreecommitdiff
path: root/examples
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 /examples
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 'examples')
-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
6 files changed, 7 insertions, 7 deletions
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