build: handle directory with whitespace in AUTOREMOVE clean
[openwrt/staging/hauke.git] / include / host-build.mk
index 7f76eb1a2f5f6978340cd075382209b9c71a3e46..f06dd802301327cbedda4c43a043114ae9cbd8b8 100644 (file)
@@ -198,8 +198,8 @@ ifndef DUMP
 
     ifneq ($(CONFIG_AUTOREMOVE),)
       host-compile:
-               $(FIND) $(HOST_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' | \
-                       $(XARGS) rm -rf
+               $(FIND) $(HOST_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -print0 | \
+                       $(XARGS) -0 rm -rf
     endif
   endef
 endif