rootfs-overlay: use a make foreach instead of a shell for
authorLuca Ceresoli <luca@lucaceresoli.net>
Mon, 8 Apr 2013 06:50:16 +0000 (06:50 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Tue, 30 Apr 2013 20:37:18 +0000 (22:37 +0200)
Makes the code uniform with the post-build and post-image implementation
(which is slightly simpler and, presumably, more efficient).

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Makefile

index 840aa1fe9fb359fd8c8a84b0840b791537a5f5fc..97804ff78c22413299ee577f306a55730e6acc64 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -501,13 +501,12 @@ endif
                echo "PRETTY_NAME=\"Buildroot $(BR2_VERSION)\"" \
        ) >  $(TARGET_DIR)/etc/os-release
 
-       @for dir in $(call qstrip,$(BR2_ROOTFS_OVERLAY)); do \
-               $(call MESSAGE,"Copying overlay $${dir}"); \
+       @$(foreach d, $(call qstrip,$(BR2_ROOTFS_OVERLAY)), \
+               $(call MESSAGE,"Copying overlay $(d)"); \
                rsync -a \
                        --exclude .empty --exclude .svn --exclude .git \
                        --exclude .hg --exclude '*~' \
-                       $${dir}/ $(TARGET_DIR); \
-       done
+                       $(d)/ $(TARGET_DIR)$(sep))
 
        @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \
                $(call MESSAGE,"Executing post-build script $(s)"); \