diff --git a/tool/depot/build b/tool/depot/build index eeaec6ef25..d3b9818b9a 100755 --- a/tool/depot/build +++ b/tool/depot/build @@ -45,6 +45,8 @@ define HELP_MESSAGE KEEP_BUILD_DIR=1 Do not remove build directories of built binary packages. This is useful for debugging build problems. + + CCACHE=1 Compiler calls will use the C/C++ compiler cache. endef export GENODE_DIR := $(realpath $(dir $(MAKEFILE_LIST))/../..) diff --git a/tool/depot/mk/build_bin_archive b/tool/depot/mk/build_bin_archive index 59019633f0..37b9afdd20 100755 --- a/tool/depot/mk/build_bin_archive +++ b/tool/depot/mk/build_bin_archive @@ -12,11 +12,12 @@ define HELP_MESSAGE usage: - $(firstword $(MAKEFILE_LIST)) SPEC= USER= + $(firstword $(MAKEFILE_LIST)) SPEC= USER= CCACHE= name of the source archive to build build spec, e.g., x86_32, x86_64 identity of the archive creator + compiler calls will use the C/C++ compiler cache if this is 1 endef @@ -158,12 +159,18 @@ ifneq ($(MISSING_API_DIRS),) @false endif +ifeq ($(CCACHE),1) +BUILD_CONF_CCACHE := yes +else +BUILD_CONF_CCACHE := +endif + $(BUILD_CONF): checked_src_archive checked_api_archives $(VERBOSE)mkdir -p $(dir $@) $(VERBOSE) \ ( echo "GENODE_DIR := $(GENODE_DIR)"; \ echo "BASE_DIR := $(GENODE_DIR)/repos/base"; \ - echo "override CCACHE := $(if $(CCACHE),yes)"; \ + echo "override CCACHE := $(BUILD_CONF_CCACHE)"; \ echo "REPOSITORIES := $(SRC_DIR)"; \ for api in $(USED_APIS); do \ echo "REPOSITORIES += $(DEPOT_API_DIR)/$$api"; done \