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>
This commit is contained in:
Jeffery To
2020-08-24 04:59:05 +08:00
parent 3dd55b504c
commit 9074dbd917
6 changed files with 29 additions and 35 deletions
+1 -2
View File
@@ -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