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>
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
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)
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
+