From 357a4a0db94615355fb943fb1b536860e0913e88 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= <gaetan.harter@fu-berlin.de>
Date: Tue, 31 Jul 2018 15:00:14 +0200
Subject: [PATCH] makefiles: make the build system aware of GIT_CACHE_DIR

Currently the default value was set by `dist/tools/git/git-cache`.
This moves/duplicates the default value in the build system.
---
 Makefile.include      | 1 +
 makefiles/vars.inc.mk | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Makefile.include b/Makefile.include
index 2c1dd40102..d4425a46c6 100644
--- a/Makefile.include
+++ b/Makefile.include
@@ -14,6 +14,7 @@ RIOTPKG        ?= $(RIOTBASE)/pkg
 RIOTTOOLS      ?= $(RIOTBASE)/dist/tools
 RIOTPROJECT    ?= $(shell git rev-parse --show-toplevel 2>/dev/null || pwd)
 GITCACHE       ?= $(RIOTTOOLS)/git/git-cache
+GIT_CACHE_DIR  ?= $(HOME)/.gitcache
 APPDIR         ?= $(CURDIR)
 BINDIRBASE     ?= $(APPDIR)/bin
 BINDIR         ?= $(BINDIRBASE)/$(BOARD)
diff --git a/makefiles/vars.inc.mk b/makefiles/vars.inc.mk
index 3492bffbf0..0dee732764 100644
--- a/makefiles/vars.inc.mk
+++ b/makefiles/vars.inc.mk
@@ -67,6 +67,7 @@ export UNDEF                 # Object files that the linker must include in the
 export WERROR                # Treat all compiler warnings as errors if set to 1 (see -Werror flag in GCC manual)
 
 export GITCACHE              # path to git-cache executable
+export GIT_CACHE_DIR         # path to git-cache cache directory
 export FLASHER               # The command to call on "make flash".
 export FFLAGS                # The parameters to supply to FLASHER.
 export FLASH_ADDR            # Define an offset to flash code into ROM memory.
-- 
GitLab