package/gcc/gcc-final: move to make foreach loops
This provides better error handling, and is more in line with our current coding style. We also replace ";" by "&&" for the same reason of proper error handling. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Romain Naour <romain.naour@smile.fr>
This commit is contained in:
parent
47918e24b9
commit
21eb27c76e
@ -169,30 +169,30 @@ endif
|
||||
HOST_GCC_FINAL_USR_LIBS += $(call qstrip,$(BR2_TOOLCHAIN_EXTRA_LIBS))
|
||||
|
||||
define HOST_GCC_FINAL_INSTALL_STATIC_LIBS
|
||||
for i in $(HOST_GCC_FINAL_LIBS) ; do \
|
||||
cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/$${i}.a \
|
||||
$(STAGING_DIR)/lib/ ; \
|
||||
done
|
||||
for i in $(HOST_GCC_FINAL_USR_LIBS) ; do \
|
||||
cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/$${i}.a \
|
||||
$(STAGING_DIR)/usr/lib/ ; \
|
||||
done
|
||||
$(foreach lib,$(HOST_GCC_FINAL_LIBS), \
|
||||
cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/$(lib).a \
|
||||
$(STAGING_DIR)/lib/
|
||||
)
|
||||
$(foreach lib,$(HOST_GCC_FINAL_USR_LIBS), \
|
||||
cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/$(lib).a \
|
||||
$(STAGING_DIR)/usr/lib/
|
||||
)
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_STATIC_LIBS),)
|
||||
define HOST_GCC_FINAL_INSTALL_SHARED_LIBS
|
||||
for i in $(HOST_GCC_FINAL_LIBS) ; do \
|
||||
cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/$${i}.so* \
|
||||
$(STAGING_DIR)/lib/ ; \
|
||||
cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/$${i}.so* \
|
||||
$(TARGET_DIR)/lib/ ; \
|
||||
done
|
||||
for i in $(HOST_GCC_FINAL_USR_LIBS) ; do \
|
||||
cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/$${i}.so* \
|
||||
$(STAGING_DIR)/usr/lib/ ; \
|
||||
cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/$${i}.so* \
|
||||
$(TARGET_DIR)/usr/lib/ ; \
|
||||
done
|
||||
$(foreach lib,$(HOST_GCC_FINAL_LIBS), \
|
||||
cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/$(lib).so* \
|
||||
$(STAGING_DIR)/lib/ && \
|
||||
cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/$(lib).so* \
|
||||
$(TARGET_DIR)/lib/
|
||||
)
|
||||
$(foreach lib,$(HOST_GCC_FINAL_USR_LIBS), \
|
||||
cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/$(lib).so* \
|
||||
$(STAGING_DIR)/usr/lib/ && \
|
||||
cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/$(lib).so* \
|
||||
$(TARGET_DIR)/usr/lib/
|
||||
)
|
||||
endef
|
||||
endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user