El jue., 13 feb. 2020 a las 16:08, Ahmad Fatoum
(<a.fat...@pengutronix.de>) escribió:
>
> On 2/13/20 4:05 PM, Guillermo Rodriguez Garcia wrote:
>
> >>>>>
> >>>>>>>>> +# 
> >>>>>>>>> ----------------------------------------------------------------------------
> >>>>>>>>> +# Install
> >>>>>>>>> +# 
> >>>>>>>>> ----------------------------------------------------------------------------
> >>>>>>>>> +
> >>>>>>>>> +$(STATEDIR)/tf-a.install:
> >>>>>>>>> +       @$(call targetinfo)
> >>>>>>>>> +ifeq ($(TF_A_ARTIFACTS_SRC),)
> >>>>>>>>> +       $(warning TF_A_ARTIFACTS is empty. nothing to install.)
> >>>>>>>>> +else
> >>>>>>>>> +       @install -m644 -D \
> >>>>>>>>> +               
> >>>>>>>>> --target-directory=$(PTXCONF_SYSROOT_TARGET)/usr/lib/firmware \
> >>>>>>>>
>
> > OK this makes sense.
> >
> > But, you should at least make sure
> > $(PTXCONF_SYSROOT_TARGET)/usr/lib/firmware exists before trying to
> > copy anything into it.
>
> That's why -D is there. From man install(1):
>
> -D     create all leading components of DEST except the last, or all 
> components of
>         --target-directory, then copy SOURCE to DEST

Yes but the effect of -D combined with --target-directory does not
seem to be standard; my version of install does not support it.
The man page for my version says:

-D     create all leading components of DEST except the last, then
copy SOURCE to DEST

And a quick test yields the following:

$ touch test
$ install -D --target-directory a/b/c test
install: failed to access 'a/b/c': No such file or director

I guess it's better to avoid relying on that behaviour and create the
directory explicitly instead.

BR,

Guillermo Rodriguez Garcia
guille.rodrig...@gmail.com

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to