aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2020-08-24 04:59:05 +0800
committerJeffery To <jeffery.to@gmail.com>2020-10-06 16:28:06 +0800
commit9074dbd91770d9913378a3c20e31ea5bde2c2be7 (patch)
treeb9b15368458c0872d2bdfb25fca8b730bf8f0b97 /utils
parent3dd55b504cb4d7d4ca0251f4ce7b45ec8effeaf8 (diff)
golang: Share build cache across package builds
This also adds a config option GOLANG_BUILD_CACHE_DIR to customize the location of the build cache directory. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/ctop/Makefile5
-rw-r--r--utils/docker-ce/Makefile3
2 files changed, 3 insertions, 5 deletions
diff --git a/utils/ctop/Makefile b/utils/ctop/Makefile
index aae82f010..85242dbe5 100644
--- a/utils/ctop/Makefile
+++ b/utils/ctop/Makefile
@@ -35,12 +35,11 @@ endef
MAKE_PATH:=$(GO_PKG_WORK_DIR_NAME)/build/src/$(GO_PKG)
MAKE_VARS += \
GOPATH=$(GO_PKG_BUILD_DIR) \
- GOCACHE=$(GO_PKG_CACHE_DIR) \
- GOTMPDIR=$(GO_PKG_TMP_DIR) \
+ GOCACHE=$(GO_BUILD_CACHE_DIR) \
GOROOT_FINAL=$(GO_TARGET_ROOT) \
CC=$(TARGET_CC) \
CXX=$(TARGET_CXX) \
- $(call GoPackage/Environment)
+ $(GO_PKG_VARS)
MAKE_FLAGS += \
COMMIT=$(PKG_SOURCE_VERSION)
diff --git a/utils/docker-ce/Makefile b/utils/docker-ce/Makefile
index 1f6c1ee79..fe072902e 100644
--- a/utils/docker-ce/Makefile
+++ b/utils/docker-ce/Makefile
@@ -77,8 +77,7 @@ define Build/Configure
mkdir -p $(GO_PKG_BUILD_DIR)/bin \
$(GO_PKG_BUILD_DIR)/src \
$(GO_PKG_BUILD_DIR)/src/$(GO_PKG)/ \
- $(GO_PKG_CACHE_DIR) \
- $(GO_PKG_TMP_DIR)
+ $(GO_BUILD_CACHE_DIR)
$(LN) $(PKG_BUILD_DIR)/cli $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)/cli
$(LN) $(PKG_BUILD_DIR)/engine $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)/docker
endef