diff mbox series

[v2,6/8] examples/kni: fix dependency check for building with meson

Message ID 20180703103119.15747-7-bruce.richardson@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers show
Series Enable 32-bit native builds with meson | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Bruce Richardson July 3, 2018, 10:31 a.m. UTC
Rather than hard-coding the example app to be built only when a set of
conditions are met, we can simplify things by having the app built when
KNI library itself is available. That saves us duplicating the same set
of restrictions on both library and example app.

Fixes: 89f0711f9ddf ("examples: build some samples with meson")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Series-acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 examples/kni/meson.build | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Ferruh Yigit July 3, 2018, 12:09 p.m. UTC | #1
On 7/3/2018 11:31 AM, Bruce Richardson wrote:
> Rather than hard-coding the example app to be built only when a set of
> conditions are met, we can simplify things by having the app built when
> KNI library itself is available. That saves us duplicating the same set
> of restrictions on both library and example app.
> 
> Fixes: 89f0711f9ddf ("examples: build some samples with meson")
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Series-acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
diff mbox series

Patch

diff --git a/examples/kni/meson.build b/examples/kni/meson.build
index 0443ab99b..791316394 100644
--- a/examples/kni/meson.build
+++ b/examples/kni/meson.build
@@ -6,9 +6,8 @@ 
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
-if host_machine.system() != 'linux'
-	build = false
-endif
+# this app can be built if-and-only-if KNI library is buildable
+build = dpdk_conf.has('RTE_LIBRTE_KNI')
 deps += ['kni', 'bus_pci']
 sources = files(
 	'main.c'