[oe] [PATCH] opencl-headers: Initial recipe for OpenCL headers
Denys Dmytriyenko
denis at denix.org
Mon Oct 15 19:34:37 UTC 2018
On Mon, Oct 15, 2018 at 08:07:06PM +0100, Burton, Ross wrote:
> On Mon, 15 Oct 2018 at 20:01, Denys Dmytriyenko <denis at denix.org> wrote:
> > > > > > > > > > +do_install () {
> > > > > > > > > > + install -d ${D}${includedir}/CL/
> > > > > > > > > > + for f in ${S}/CL/*.h; do
> > > > > > > > > > + install -m 0644 $f ${D}${includedir}/CL/
> > > > > >
> > > > > > Single file install? Not very optimized...
> > > >
> > > > > Its not a single file, Installing all the header files.
> > > >
> > > > It's a single file install in a for loop, hence my comment about being
> > > > unoptimal. Why not use "cp *.h"?
> > >
> > > I agree its suboptimal use here. May be
> > >
> > > install [OPTION]... -t DIRECTORY SOURCE
> > >
> > > could be tamed to make it better.
> > > however cp messes the file permissions up if not used with right opts.
> > > So I would not prefer it unless used with right
> > > options to respect the file perms. Install does it correctly,
> >
> > Agree, cp would require passing correct options, but there are plenty of
> > examples alreay.
>
> If we're bikeshedding a micro-optimisation then surely this is optimal:
>
> install -m 0644 -D -t ${D}${includedir}/CL ${S}/CL/*.h
>
> That combines the mkdir and cp in one command.
+1
And who said bikeshedding is a waste of time? :)
--
Denys
More information about the Openembedded-devel
mailing list