From 6b3f241be20ec11cd6b028220e8bfe0cdff0a23d Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Wed, 10 Jun 2020 18:46:49 +0200 Subject: [PATCH] pkg/pkg.mk: define GITCACHE and only export GIT_CACHE_DIR from there --- pkg/pkg.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/pkg.mk b/pkg/pkg.mk index bd14418b8d..4a2b5edb9a 100644 --- a/pkg/pkg.mk +++ b/pkg/pkg.mk @@ -28,6 +28,13 @@ PKG_DIR ?= $(CURDIR) PKG_BUILDDIR ?= $(PKGDIRBASE)/$(PKG_NAME) PKG_SOURCE_LOCAL ?= $(PKG_SOURCE_LOCAL_$(shell echo $(PKG_NAME) | tr a-z- A-Z_)) +# git-cache specific management: GIT_CACHE_DIR is exported only +# when cloning the repository. +GITCACHE ?= $(RIOTTOOLS)/git/git-cache +GIT_CACHE_DIR ?= $(HOME)/.gitcache +include $(RIOTBASE)/makefiles/utils/variables.mk +$(call target-export-variables,$(PKG_BUILDDIR)/.git,GIT_CACHE_DIR) + # allow overriding package source with local folder (useful during development) ifneq (,$(PKG_SOURCE_LOCAL)) include $(RIOTBASE)/pkg/local.mk