aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-01-18 18:00:00 +0100
committerFelix Fietkau <nbd@nbd.name>2017-01-18 23:57:09 +0100
commitd98bb7e6b96d5bb700800c797f68bf391335374d (patch)
treebd2d4f055248feffea750cb480d8be3608d4742f /include
parent131db366a3785a72b6e742f1842d29c1ad200601 (diff)
downloadupstream-d98bb7e6b96d5bb700800c797f68bf391335374d.tar.gz
upstream-d98bb7e6b96d5bb700800c797f68bf391335374d.tar.bz2
upstream-d98bb7e6b96d5bb700800c797f68bf391335374d.zip
build: extend CONFIG_AUTOREMOVE to tools/
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'include')
-rw-r--r--include/host-build.mk6
-rw-r--r--include/toolchain-build.mk1
2 files changed, 7 insertions, 0 deletions
diff --git a/include/host-build.mk b/include/host-build.mk
index 23565533ba..bbf4633c41 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
diff --git a/include/toolchain-build.mk b/include/toolchain-build.mk
index 212923a1e6..efc35e2789 100644
--- a/include/toolchain-build.mk
+++ b/include/toolchain-build.mk
@@ -6,6 +6,7 @@
#
override CONFIG_AUTOREBUILD=
+override CONFIG_AUTOREMOVE=
REAL_STAGING_DIR_HOST:=$(STAGING_DIR_HOST)
STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)