On 2/13/20 4:24 PM, Guillermo Rodriguez Garcia wrote: > El jue., 13 feb. 2020 a las 16:08, Ahmad Fatoum > (<[email protected]>) 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.
I see. Will replace with separate install -d in a v3 then. > > BR, > > Guillermo Rodriguez Garcia > [email protected] > -- Pengutronix e.K. | | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list [email protected]
