[v2,1/3] examples: fix install of sample apps if setting not provided

Message ID 20190517114613.7027-2-bruce.richardson@intel.com (mailing list archive)
State Superseded, archived
Headers
Series Fixes for building examples |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Bruce Richardson May 17, 2019, 11:46 a.m. UTC
  While the examples were being installed into the appropriate install path
when processing the examples/meson.build file, that file was only processed
if the "examples" meson parameter was non-empty. Since we now do more than
just build the examples, we need to unconditionally process the file.

Fixes: 2daf565f91b5 ("examples: install as part of ninja install")

Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 meson.build | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
  

Comments

Bruce Richardson May 17, 2019, 11:54 a.m. UTC | #1
On Fri, May 17, 2019 at 12:46:11PM +0100, Bruce Richardson wrote:
> While the examples were being installed into the appropriate install path
> when processing the examples/meson.build file, that file was only processed
> if the "examples" meson parameter was non-empty. Since we now do more than
> just build the examples, we need to unconditionally process the file.
> 
> Fixes: 2daf565f91b5 ("examples: install as part of ninja install")
> 
> Cc: stable@dpdk.org
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  meson.build | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 46f9c5683..9cad43481 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -42,10 +42,9 @@ subdir('app')
>  # build docs
>  subdir('doc')
>  
> -# build any examples explicitly requested - useful for developers
> -if get_option('examples') != ''
> -	subdir('examples')
> -endif
> +# build any examples explicitly requested - useful for developers - and
> +# install any example code into the appropriate install path
> +subdir('examples')
>  
>  # build kernel modules if enabled
>  if get_option('enable_kmods')

Self-nak, sorry. Need to take account of an empty "examples" value inside
examples/meson.build.

V3 to follow soon. :-(

/Bruce
  

Patch

diff --git a/meson.build b/meson.build
index 46f9c5683..9cad43481 100644
--- a/meson.build
+++ b/meson.build
@@ -42,10 +42,9 @@  subdir('app')
 # build docs
 subdir('doc')
 
-# build any examples explicitly requested - useful for developers
-if get_option('examples') != ''
-	subdir('examples')
-endif
+# build any examples explicitly requested - useful for developers - and
+# install any example code into the appropriate install path
+subdir('examples')
 
 # build kernel modules if enabled
 if get_option('enable_kmods')