From d98bb7e6b96d5bb700800c797f68bf391335374d Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 18 Jan 2017 18:00:00 +0100 Subject: build: extend CONFIG_AUTOREMOVE to tools/ Signed-off-by: Felix Fietkau --- include/host-build.mk | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/host-build.mk') diff --git a/include/host-build.mk b/include/host-build.mk index 2356553..bbf4633 100644 --- a/include/host-build.mk +++ b/include/host-build.mk @@ -172,6 +172,7 @@ ifndef DUMP ifndef STAMP_BUILT $(foreach t,$(DEFAULT_SUBDIR_TARGETS), $(t): host-$(t) + .$(t): .host-$(t) ) endif @@ -183,6 +184,11 @@ ifndef DUMP $(call Host/Uninstall) rm -rf $(HOST_BUILD_DIR) $(HOST_STAMP_INSTALLED) $(HOST_STAMP_BUILT) + ifneq ($(CONFIG_AUTOREMOVE),) + host-compile: + $(FIND) $(HOST_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' | \ + $(XARGS) rm -rf + endif endef endif -- cgit v1.1