From: Thomas Petazzoni Date: Sun, 22 Dec 2019 20:17:36 +0000 (+0100) Subject: package/ebtables: use a foreach make loop instead of a for shell loop X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aa5d8a2b3fe3559db1256b8395561088e4500ba7;p=buildroot.git package/ebtables: use a foreach make loop instead of a for shell loop make loops are more commonly used in Buildroot, are shorter, and have built-in error handling. Signed-off-by: Thomas Petazzoni --- diff --git a/package/ebtables/ebtables.mk b/package/ebtables/ebtables.mk index 7b2264703c..9a975cc7a1 100644 --- a/package/ebtables/ebtables.mk +++ b/package/ebtables/ebtables.mk @@ -23,10 +23,10 @@ define EBTABLES_INSTALL_TARGET_CMDS endef else define EBTABLES_INSTALL_TARGET_CMDS - for so in $(@D)/*.so $(@D)/extensions/*.so; do \ - $(INSTALL) -m 0755 -D $${so} \ - $(TARGET_DIR)/lib/ebtables/`basename $${so}` || exit 1; \ - done + $(foreach so,$(wildcard $(@D)/*.so $(@D)/extensions/*.so), \ + $(INSTALL) -m 0755 -D $(so) \ + $(TARGET_DIR)/lib/ebtables/$(notdir $(so)) + ) $(INSTALL) -m 0755 -D $(@D)/ebtables $(TARGET_DIR)/sbin/ebtables $(INSTALL) -m 0644 -D $(@D)/ethertypes $(TARGET_DIR)/etc/ethertypes endef