kvargs: fix building with meson outside source tree

Message ID 20180719142648.44824-1-bruce.richardson@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Bruce Richardson
Headers
Series kvargs: fix building with meson outside source tree |

Checks

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

Commit Message

Bruce Richardson July 19, 2018, 2:26 p.m. UTC
  When building DPDK with meson with the <builddir> being outside the source
directory, an error was generated as the path to the EAL headers was not
found. The path specified for the includes backed out unnecessarily far and
so broke when the build directory was not in the expected location of
just inside the source dir. Changing the path to be shorter, just going
down one level and then into EAL builds for both cases - where builddir is
in source directory, and also when it's outside it.

Fixes: 092ee516496d ("kvargs: build before EAL")

Reported-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_kvargs/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Burakov, Anatoly July 19, 2018, 2:45 p.m. UTC | #1
On 19-Jul-18 3:26 PM, Bruce Richardson wrote:
> When building DPDK with meson with the <builddir> being outside the source
> directory, an error was generated as the path to the EAL headers was not
> found. The path specified for the includes backed out unnecessarily far and
> so broke when the build directory was not in the expected location of
> just inside the source dir. Changing the path to be shorter, just going
> down one level and then into EAL builds for both cases - where builddir is
> in source directory, and also when it's outside it.
> 
> Fixes: 092ee516496d ("kvargs: build before EAL")
> 
> Reported-by: Anatoly Burakov <anatoly.burakov@intel.com>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>   lib/librte_kvargs/meson.build | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_kvargs/meson.build b/lib/librte_kvargs/meson.build
> index a1c724961..acd3e5432 100644
> --- a/lib/librte_kvargs/meson.build
> +++ b/lib/librte_kvargs/meson.build
> @@ -2,7 +2,7 @@
>   # Copyright(c) 2017 Intel Corporation
>   
>   includes = [global_inc]
> -includes += include_directories('../../../lib/librte_eal/common/include')
> +includes += include_directories('../librte_eal/common/include')
>   
>   version = 1
>   sources = files('rte_kvargs.c')
> 

Tested-by: Anatoly Burakov <anatoly.burakov@intel.com>
  
Thomas Monjalon July 26, 2018, 8:14 a.m. UTC | #2
19/07/2018 16:45, Burakov, Anatoly:
> On 19-Jul-18 3:26 PM, Bruce Richardson wrote:
> > When building DPDK with meson with the <builddir> being outside the source
> > directory, an error was generated as the path to the EAL headers was not
> > found. The path specified for the includes backed out unnecessarily far and
> > so broke when the build directory was not in the expected location of
> > just inside the source dir. Changing the path to be shorter, just going
> > down one level and then into EAL builds for both cases - where builddir is
> > in source directory, and also when it's outside it.
> > 
> > Fixes: 092ee516496d ("kvargs: build before EAL")
> > 
> > Reported-by: Anatoly Burakov <anatoly.burakov@intel.com>
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> Tested-by: Anatoly Burakov <anatoly.burakov@intel.com>

Applied, thanks
  

Patch

diff --git a/lib/librte_kvargs/meson.build b/lib/librte_kvargs/meson.build
index a1c724961..acd3e5432 100644
--- a/lib/librte_kvargs/meson.build
+++ b/lib/librte_kvargs/meson.build
@@ -2,7 +2,7 @@ 
 # Copyright(c) 2017 Intel Corporation
 
 includes = [global_inc]
-includes += include_directories('../../../lib/librte_eal/common/include')
+includes += include_directories('../librte_eal/common/include')
 
 version = 1
 sources = files('rte_kvargs.c')