瀏覽代碼

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 <[email protected]>
Sven Wegener 4 年之前
父節點
當前提交
cd5f66652b
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      Makefile
  2. 2 2
      include/toplevel.mk

+ 1 - 1
Makefile

@@ -64,7 +64,7 @@ dirclean: clean
 
 cacheclean:
 ifneq ($(CONFIG_CCACHE),)
-	rm -rf $(CCACHE_DIR)
+	$(STAGING_DIR_HOST)/bin/ccache -C
 endif
 
 ifndef DUMP_TARGET_DB

+ 2 - 2
include/toplevel.mk

@@ -261,8 +261,8 @@ package/symlinks-clean:
 help:
 	cat README.md
 
-distclean: cacheclean
-	rm -rf bin build_dir .config* dl feeds key-build* logs package/feeds package/openwrt-packages staging_dir tmp
+distclean:
+	rm -rf bin build_dir .ccache .config* dl feeds key-build* logs package/feeds package/openwrt-packages staging_dir tmp
 	@$(_SINGLE)$(SUBMAKE) -C scripts/config clean
 
 ifeq ($(findstring v,$(DEBUG)),)