summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--docs/manual/common-usage.txt3
2 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index c871393b79..dd8959f019 100644
--- a/Makefile
+++ b/Makefile
@@ -183,7 +183,9 @@ endif
ifneq ($(BR2_DL_DIR),)
DL_DIR := $(BR2_DL_DIR)
endif
-
+ifneq ($(BR2_CCACHE_DIR),)
+BR_CACHE_DIR := $(BR2_CCACHE_DIR)
+endif
# Need that early, before we scan packages
# Avoids doing the $(or...) everytime
@@ -371,7 +373,7 @@ TARGET_DIR_WARNING_FILE = $(TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
ifeq ($(BR2_CCACHE),y)
CCACHE := $(HOST_DIR)/usr/bin/ccache
-BR_CACHE_DIR = $(call qstrip,$(BR2_CCACHE_DIR))
+BR_CACHE_DIR ?= $(call qstrip,$(BR2_CCACHE_DIR))
export BR_CACHE_DIR
HOSTCC := $(CCACHE) $(HOSTCC)
HOSTCXX := $(CCACHE) $(HOSTCXX)
diff --git a/docs/manual/common-usage.txt b/docs/manual/common-usage.txt
index 3ae05c7d9d..bca99f45b9 100644
--- a/docs/manual/common-usage.txt
+++ b/docs/manual/common-usage.txt
@@ -84,6 +84,9 @@ to +make+ or set in the environment:
configuration interface, so through the Buildroot +.config+ file; this
is the recommended way of setting it.
+
+* +BR2_CCACHE_DIR+ to override the directory where
+ Buildroot stores the cached files when using ccache.
+ +
* +BR2_DL_DIR+ to override the directory in which
Buildroot stores/retrieves downloaded files
+
OpenPOWER on IntegriCloud