From 2ca084ccaae619ac8031e902c66817d021ac6fd5 Mon Sep 17 00:00:00 2001 From: Roman Yeryomin Date: Fri, 12 Jun 2020 21:43:46 +0300 Subject: build: improve ccache support Set CCACHE_DIR to $(TOPDIR)/.ccache and CCACHE_BASEDIR to $(TOPDIR). This allows to do clean and dirclean. Cache hit rate for test build after dirclean is ~65%. If CCACHE is enabled stats are printed out at the end of building process. CCACHE_DIR config variable allows to override default, which could be useful when sharing cache with many builds. cacheclean make target allows to clean the cache. Changes from v1: - remove ccache directory using CCACHE_DIR variable - remove ccache leftovers from sdk and toolchain make files - introduce CONFIG_CCACHE_DIR variable - introduce cacheclean make target Signed-off-by: Roman Yeryomin --- include/toplevel.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/toplevel.mk') diff --git a/include/toplevel.mk b/include/toplevel.mk index 8564a4de73..0a64afe153 100644 --- a/include/toplevel.mk +++ b/include/toplevel.mk @@ -262,7 +262,7 @@ package/symlinks-clean: help: cat README -distclean: +distclean: cacheclean rm -rf bin build_dir .config* dl feeds key-build* logs package/feeds package/openwrt-packages staging_dir tmp @$(_SINGLE)$(SUBMAKE) -C scripts/config clean -- cgit v1.2.3