Browse Source

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>
lilik-openwrt-22.03
Jeffery To 5 years ago
parent
commit
d2f5e6966b
5 changed files with 14 additions and 14 deletions
  1. +10
    -10
      lang/golang/golang-package.mk
  2. +1
    -1
      lang/golang/golang/Makefile
  3. +1
    -1
      utils/containerd/Makefile
  4. +1
    -1
      utils/docker-ce/Makefile
  5. +1
    -1
      utils/runc/Makefile

+ 10
- 10
lang/golang/golang-package.mk View File

@ -160,7 +160,7 @@ define GoPackage/GoSubMenu
CATEGORY:=Languages CATEGORY:=Languages
endef endef
define GoPackage/Environment/Target
GO_PKG_TARGET_VARS= \
GOOS=$(GO_OS) \ GOOS=$(GO_OS) \
GOARCH=$(GO_ARCH) \ GOARCH=$(GO_ARCH) \
GO386=$(GO_386) \ GO386=$(GO_386) \
@ -174,20 +174,20 @@ define GoPackage/Environment/Target
CGO_CPPFLAGS="$(TARGET_CPPFLAGS)" \ CGO_CPPFLAGS="$(TARGET_CPPFLAGS)" \
CGO_CXXFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CXXFLAGS))" \ CGO_CXXFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CXXFLAGS))" \
CGO_LDFLAGS="$(TARGET_LDFLAGS)" CGO_LDFLAGS="$(TARGET_LDFLAGS)"
endef
define GoPackage/Environment/Build
GO_PKG_BUILD_VARS= \
GOPATH=$(GO_PKG_BUILD_DIR) \ GOPATH=$(GO_PKG_BUILD_DIR) \
GOCACHE=$(GO_PKG_CACHE_DIR) \ GOCACHE=$(GO_PKG_CACHE_DIR) \
GOENV=off 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)
GO_PKG_VARS=$(GO_PKG_DEFAULT_VARS)
GoPackage/Environment=$(call GoPackage/Environment/Default)
# 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 # false if directory does not exist
GoPackage/is_dir_not_empty=$$$$($(FIND) $(1) -maxdepth 0 -type d \! -empty 2>/dev/null) GoPackage/is_dir_not_empty=$$$$($(FIND) $(1) -maxdepth 0 -type d \! -empty 2>/dev/null)
@ -273,7 +273,7 @@ endef
define GoPackage/Build/Compile define GoPackage/Build/Compile
( \ ( \
cd $(GO_PKG_BUILD_DIR) ; \ cd $(GO_PKG_BUILD_DIR) ; \
export $(call GoPackage/Environment) ; \
export $(GO_PKG_VARS) ; \
\ \
echo "Finding targets" ; \ echo "Finding targets" ; \
targets=$$$$(go list $(GO_PKG_BUILD_PKG)) ; \ targets=$$$$(go list $(GO_PKG_BUILD_PKG)) ; \


+ 1
- 1
lang/golang/golang/Makefile View File

@ -310,7 +310,7 @@ define Build/Compile
( \ ( \
cd $(PKG_BUILD_DIR)/bin ; \ cd $(PKG_BUILD_DIR)/bin ; \
export $(call GoPackage/Environment/Target) ; \
export $(GO_PKG_TARGET_VARS) ; \
$(CP) go go-host ; \ $(CP) go go-host ; \
GOROOT_FINAL=$(PKG_GO_ROOT) \ GOROOT_FINAL=$(PKG_GO_ROOT) \
GOCACHE=$(PKG_GO_TARGET_CACHE_DIR) \ GOCACHE=$(PKG_GO_TARGET_CACHE_DIR) \


+ 1
- 1
utils/containerd/Makefile View File

@ -49,7 +49,7 @@ endef
GO_PKG_INSTALL_ALL:=1 GO_PKG_INSTALL_ALL:=1
MAKE_PATH:=$(GO_PKG_WORK_DIR_NAME)/build/src/$(GO_PKG) MAKE_PATH:=$(GO_PKG_WORK_DIR_NAME)/build/src/$(GO_PKG)
MAKE_VARS += $(call GoPackage/Environment)
MAKE_VARS += $(GO_PKG_VARS)
MAKE_FLAGS += \ MAKE_FLAGS += \
DESTDIR="$(PKG_INSTALL_DIR)" \ DESTDIR="$(PKG_INSTALL_DIR)" \
VERSION=$(PKG_VERSION) \ VERSION=$(PKG_VERSION) \


+ 1
- 1
utils/docker-ce/Makefile View File

@ -78,7 +78,7 @@ endif
define Build/Compile define Build/Compile
( \ ( \
export $(call GoPackage/Environment) \
export $(GO_PKG_VARS) \
GITCOMMIT=$(PKG_SOURCE_VERSION) \ GITCOMMIT=$(PKG_SOURCE_VERSION) \
DOCKER_GITCOMMIT=$(PKG_SOURCE_VERSION) \ DOCKER_GITCOMMIT=$(PKG_SOURCE_VERSION) \
DOCKER_BUILDTAGS='$(BUILDTAGS)' \ DOCKER_BUILDTAGS='$(BUILDTAGS)' \


+ 1
- 1
utils/runc/Makefile View File

@ -49,7 +49,7 @@ endef
GO_PKG_INSTALL_ALL:=1 GO_PKG_INSTALL_ALL:=1
MAKE_PATH:=$(GO_PKG_WORK_DIR_NAME)/build/src/$(GO_PKG) MAKE_PATH:=$(GO_PKG_WORK_DIR_NAME)/build/src/$(GO_PKG)
MAKE_VARS += $(call GoPackage/Environment)
MAKE_VARS += $(GO_PKG_VARS)
MAKE_FLAGS += \ MAKE_FLAGS += \
COMMIT=$(PKG_SOURCE_VERSION) COMMIT=$(PKG_SOURCE_VERSION)


Loading…
Cancel
Save