$(call check-symlink,WARN,/etc/schroot/setup.d/$*,$(ABSLOCAL)/etc/schroot/setup.d/$*)
.PHONY: $(addprefix check-script/,$(SCHROOT_SCRIPTS))
+###--------------------------------------------------------------------------
+### Ccache setup.
+
+CCACHE_CONFIGS = $(foreach r,$(ALL_CHROOTS), \
+ /var/lib/sbuild/build/.ccache/$(LVPREFIX)$r/ccache.conf)
+all:: $(CCACHE_CONFIGS)
+$(CCACHE_CONFIGS): /var/lib/sbuild/build/.ccache/$(LVPREFIX)%/ccache.conf: \
+ etc/ccache.conf
+ $(V_AT)mkdir -p $(dir $@)
+ $(call v_tag,COPY)cp $< $@.new && mv $@.new $@
+
###--------------------------------------------------------------------------
### `/usr/local/' structure.
## Set up compiler caching. This makes a big difference to build times.
PATH=/usr/lib/ccache:$PATH; export PATH
-CCACHE_DIR=/build/.ccache; export CCACHE_DIR
+CCACHE_DIR=/build/.ccache/$SCHROOT_CHROOT_NAME; export CCACHE_DIR
unset CCACHE_HARDLINK
CCACHE_COMPRESS=t; export CCACHE_COMPRESS
CCACHE_UMASK=002; export CCACHE_UMASK
--- /dev/null
+### -*-conf-*-
+
+max_size = 256Mi
## Actually resolve alternatives properly.
$resolve_alternatives = 1;
+## Leave debris for diagnostics.
+$purge_build_deps = "successful";
+$purge_build_directory = "successful";
+$purge_session = "successful";
+
## Don't do anything clever if the build dependencies fail. The clever thing
## doesn't work on older distributions. Also, it takes extra time, and
## that's not desirable.