mirror of
https://github.com/openwrt/packages.git
synced 2025-12-26 11:16:31 +04:00
golang: Rename GoPackage/Environment to GO_PKG_VARS
The variable is a list of shell variables; the new name is more in-line with other parts the build system (CONFIGURE_VARS, MAKE_VARS, etc.). GoPackage/Environment is kept (for now) in case other feeds are using it. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
@@ -160,7 +160,7 @@ define GoPackage/GoSubMenu
|
||||
CATEGORY:=Languages
|
||||
endef
|
||||
|
||||
define GoPackage/Environment/Target
|
||||
GO_PKG_TARGET_VARS= \
|
||||
GOOS=$(GO_OS) \
|
||||
GOARCH=$(GO_ARCH) \
|
||||
GO386=$(GO_386) \
|
||||
@@ -174,20 +174,20 @@ define GoPackage/Environment/Target
|
||||
CGO_CPPFLAGS="$(TARGET_CPPFLAGS)" \
|
||||
CGO_CXXFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CXXFLAGS))" \
|
||||
CGO_LDFLAGS="$(TARGET_LDFLAGS)"
|
||||
endef
|
||||
|
||||
define GoPackage/Environment/Build
|
||||
GO_PKG_BUILD_VARS= \
|
||||
GOPATH=$(GO_PKG_BUILD_DIR) \
|
||||
GOCACHE=$(GO_PKG_CACHE_DIR) \
|
||||
GOENV=off
|
||||
endef
|
||||
|
||||
define GoPackage/Environment/Default
|
||||
$(call GoPackage/Environment/Target) \
|
||||
$(call GoPackage/Environment/Build)
|
||||
endef
|
||||
GO_PKG_DEFAULT_VARS= \
|
||||
$(GO_PKG_TARGET_VARS) \
|
||||
$(GO_PKG_BUILD_VARS)
|
||||
|
||||
GoPackage/Environment=$(call GoPackage/Environment/Default)
|
||||
GO_PKG_VARS=$(GO_PKG_DEFAULT_VARS)
|
||||
|
||||
# do not use for new code; this will be removed after the next OpenWrt release
|
||||
GoPackage/Environment=$(GO_PKG_VARS)
|
||||
|
||||
# false if directory does not exist
|
||||
GoPackage/is_dir_not_empty=$$$$($(FIND) $(1) -maxdepth 0 -type d \! -empty 2>/dev/null)
|
||||
@@ -273,7 +273,7 @@ endef
|
||||
define GoPackage/Build/Compile
|
||||
( \
|
||||
cd $(GO_PKG_BUILD_DIR) ; \
|
||||
export $(call GoPackage/Environment) ; \
|
||||
export $(GO_PKG_VARS) ; \
|
||||
\
|
||||
echo "Finding targets" ; \
|
||||
targets=$$$$(go list $(GO_PKG_BUILD_PKG)) ; \
|
||||
|
||||
Reference in New Issue
Block a user