crypto/scheduler: fix header install with meson

Message ID 20200917150917.22945-1-david.marchand@redhat.com (mailing list archive)
State Superseded, archived
Delegated to: David Marchand
Headers
Series crypto/scheduler: fix header install with meson |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-testing success Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK

Commit Message

David Marchand Sept. 17, 2020, 3:09 p.m. UTC
  The headers variable is only used in lib/meson.build context.
For drivers, an explicit install_headers() is necessary.

Reproduced while compiling the l2fwd-crypto example out of meson
(which can be done by adding it in devtools/test-meson-builds.sh
examples build test).

Fixes: cd2b6458a1cb ("crypto/scheduler: add in meson build")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/crypto/scheduler/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Bruce Richardson Sept. 17, 2020, 3:29 p.m. UTC | #1
On Thu, Sep 17, 2020 at 05:09:17PM +0200, David Marchand wrote:
> The headers variable is only used in lib/meson.build context.
> For drivers, an explicit install_headers() is necessary.
> 
> Reproduced while compiling the l2fwd-crypto example out of meson
> (which can be done by adding it in devtools/test-meson-builds.sh
> examples build test).
> 
> Fixes: cd2b6458a1cb ("crypto/scheduler: add in meson build")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>  drivers/crypto/scheduler/meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
Originally I only put the "headers" variable in the "lib" folder
meson.build because it was not expected that many drivers should have
private headers. However, perhaps it's worthwhile adding it now:
a) because private headers, while not common, are not unusual
b) for consistency and ease of use.

Thoughts?

/Bruce
  
Bruce Richardson Sept. 17, 2020, 3:29 p.m. UTC | #2
On Thu, Sep 17, 2020 at 05:09:17PM +0200, David Marchand wrote:
> The headers variable is only used in lib/meson.build context.
> For drivers, an explicit install_headers() is necessary.
> 
> Reproduced while compiling the l2fwd-crypto example out of meson
> (which can be done by adding it in devtools/test-meson-builds.sh
> examples build test).
> 
> Fixes: cd2b6458a1cb ("crypto/scheduler: add in meson build")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  
David Marchand Sept. 17, 2020, 3:33 p.m. UTC | #3
On Thu, Sep 17, 2020 at 5:29 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Thu, Sep 17, 2020 at 05:09:17PM +0200, David Marchand wrote:
> > The headers variable is only used in lib/meson.build context.
> > For drivers, an explicit install_headers() is necessary.
> >
> > Reproduced while compiling the l2fwd-crypto example out of meson
> > (which can be done by adding it in devtools/test-meson-builds.sh
> > examples build test).
> >
> > Fixes: cd2b6458a1cb ("crypto/scheduler: add in meson build")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
> >  drivers/crypto/scheduler/meson.build | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> Originally I only put the "headers" variable in the "lib" folder
> meson.build because it was not expected that many drivers should have
> private headers. However, perhaps it's worthwhile adding it now:
> a) because private headers, while not common, are not unusual
> b) for consistency and ease of use.
>
> Thoughts?

Yep, I can do it in a followup patch now, still looking at your RFC
series though.. :-)
  
Bruce Richardson Sept. 17, 2020, 3:46 p.m. UTC | #4
On Thu, Sep 17, 2020 at 05:33:23PM +0200, David Marchand wrote:
> On Thu, Sep 17, 2020 at 5:29 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > On Thu, Sep 17, 2020 at 05:09:17PM +0200, David Marchand wrote:
> > > The headers variable is only used in lib/meson.build context.
> > > For drivers, an explicit install_headers() is necessary.
> > >
> > > Reproduced while compiling the l2fwd-crypto example out of meson
> > > (which can be done by adding it in devtools/test-meson-builds.sh
> > > examples build test).
> > >
> > > Fixes: cd2b6458a1cb ("crypto/scheduler: add in meson build")
> > > Cc: stable@dpdk.org
> > >
> > > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > > ---
> > >  drivers/crypto/scheduler/meson.build | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > Originally I only put the "headers" variable in the "lib" folder
> > meson.build because it was not expected that many drivers should have
> > private headers. However, perhaps it's worthwhile adding it now:
> > a) because private headers, while not common, are not unusual
> > b) for consistency and ease of use.
> >
> > Thoughts?
> 
> Yep, I can do it in a followup patch now, still looking at your RFC
> series though.. :-)
>
No rush, what we have now has worked reasonably well for the last few
years! :-)
If you don't get to it, I can always look at it post-19.11.
  

Patch

diff --git a/drivers/crypto/scheduler/meson.build b/drivers/crypto/scheduler/meson.build
index c5ba2d6804..cb0f3a8ba9 100644
--- a/drivers/crypto/scheduler/meson.build
+++ b/drivers/crypto/scheduler/meson.build
@@ -13,7 +13,7 @@  sources = files(
 	'scheduler_roundrobin.c',
 )
 
-headers = files(
+install_headers(
 	'rte_cryptodev_scheduler.h',
 	'rte_cryptodev_scheduler_operations.h',
 )