aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Gustavo Zacarias <gustavo.zacarias@free-electrons.com>2015-10-15 10:24:39 -0300
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-10-17 16:32:41 +0200
commit3901cb515762aee9b6af67216419a9c5b83eec3d (patch)
tree84b721029738356db5387b3a97c72dad7bf2504b /Makefile
parent7f237f06319dc1716aec620774e4106c53bce44b (diff)
downloadbuildroot-3901cb515762aee9b6af67216419a9c5b83eec3d.tar.gz
buildroot-3901cb515762aee9b6af67216419a9c5b83eec3d.tar.bz2
ccache: allow for BR2_CCACHE_DIR environment override
Allow the BR2_CCACHE_DIR .config option to be overriden by the BR2_CCACHE_DIR env variable. This is useful for big projects where in some cases the developers home directory might be a NFS mount (slow) and real production builds aren't. Update documentation accordingly as well. Signed-off-by: Gustavo Zacarias <gustavo.zacarias@free-electrons.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 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)