mtd: switch to a foreach loop for installation

Such a construct allows to bail out if the installation of one of the
program fails, which the current shell-based for loop doesn't do.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Thomas Petazzoni 2017-06-08 23:05:09 +02:00
parent 67117adc89
commit 590c4104c1

View file

@ -92,9 +92,9 @@ MTD_TARGETS_$(BR2_PACKAGE_MTD_MKFSUBIFS) += mkfs.ubifs
MTD_TARGETS_$(BR2_PACKAGE_MTD_INTEGCK) += integck MTD_TARGETS_$(BR2_PACKAGE_MTD_INTEGCK) += integck
define MTD_INSTALL_TARGET_CMDS define MTD_INSTALL_TARGET_CMDS
for f in $(MTD_TARGETS_y) ; do \ $(foreach f,$(MTD_TARGETS_y), \
$(INSTALL) -D -m 0755 $(@D)/$$f $(TARGET_DIR)/usr/sbin/$${f##*/} ; \ $(INSTALL) -D -m 0755 $(@D)/$(f) $(TARGET_DIR)/usr/sbin/$(notdir $(f))
done )
endef endef
$(eval $(autotools-package)) $(eval $(autotools-package))