aboutsummaryrefslogtreecommitdiffstats
path: root/include/host-build.mk
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2022-09-07 23:50:36 +0200
committerChristian Marangi <ansuelsmth@gmail.com>2022-12-04 17:18:37 +0100
commit12b1d2f700188e7f6fbb9761510c83e36079ddc6 (patch)
tree9e45a82a1765fea93dd3c0f90beb202c992dbb26 /include/host-build.mk
parent006e52545d1421affba9c993c70996e0f9f6e596 (diff)
downloadupstream-12b1d2f700188e7f6fbb9761510c83e36079ddc6.tar.gz
upstream-12b1d2f700188e7f6fbb9761510c83e36079ddc6.tar.bz2
upstream-12b1d2f700188e7f6fbb9761510c83e36079ddc6.zip
build: handle directory with whitespace in AUTOREMOVE clean
Package with whitespace in their build directory are not correctly removed when CONFIG_AUTOREMOVE is enabled. This is caused by xargs that use whitespace as delimiters. To handle this use \0 as the delimiter and set find to use \0 as the delimiter. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> (cherry picked from commit dccee21792b89031bcd801030de403f195d80278)
Diffstat (limited to 'include/host-build.mk')
-rw-r--r--include/host-build.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/host-build.mk b/include/host-build.mk
index 36b3fed1f3..c3e0c26e6a 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -197,8 +197,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