Skip to content

Commit cd5f666

Browse files
swegeneraparcar
authored andcommitted
build: use ccache -C for cleaning the cache
This keeps the configuration, like the size of the cache, and the statistics intact. Move the removal of the cache directory to the distclean target, but only delete the .ccache directory inside of our build tree, as we should not mess with a user-configured external ccache directory this destructively. Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
1 parent e02a41f commit cd5f666

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ dirclean: clean
6464

6565
cacheclean:
6666
ifneq ($(CONFIG_CCACHE),)
67-
rm -rf $(CCACHE_DIR)
67+
$(STAGING_DIR_HOST)/bin/ccache -C
6868
endif
6969

7070
ifndef DUMP_TARGET_DB

include/toplevel.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ package/symlinks-clean:
261261
help:
262262
cat README.md
263263

264-
distclean: cacheclean
265-
rm -rf bin build_dir .config* dl feeds key-build* logs package/feeds package/openwrt-packages staging_dir tmp
264+
distclean:
265+
rm -rf bin build_dir .ccache .config* dl feeds key-build* logs package/feeds package/openwrt-packages staging_dir tmp
266266
@$(_SINGLE)$(SUBMAKE) -C scripts/config clean
267267

268268
ifeq ($(findstring v,$(DEBUG)),)

0 commit comments

Comments
 (0)