@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2018, 2020 Jeffery To
|
||||
# Copyright (C) 2018, 2020-2021, 2023 Jeffery To
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@@ -19,15 +19,15 @@ define GoCompiler/Default/CheckHost
|
||||
endef
|
||||
|
||||
# $(1) source go root
|
||||
# $(2) destination prefix
|
||||
# $(3) go version id
|
||||
# $(4) additional environment variables (optional)
|
||||
# $(2) additional environment variables (optional)
|
||||
define GoCompiler/Default/Make
|
||||
( \
|
||||
cd "$(1)/src" ; \
|
||||
$(if $(2),GOROOT_FINAL="$(2)/lib/go-$(3)") \
|
||||
$(4) \
|
||||
$(BASH) make.bash --no-banner ; \
|
||||
$(2) \
|
||||
$(BASH) make.bash \
|
||||
$(if $(findstring s,$(OPENWRT_VERBOSE)),-v) \
|
||||
--no-banner \
|
||||
; \
|
||||
)
|
||||
endef
|
||||
|
||||
@@ -74,6 +74,11 @@ define GoCompiler/Default/Install/Bin
|
||||
$(INSTALL_BIN) -p "$(1)/bin/$(4)"/* "$(2)/lib/go-$(3)/bin/"
|
||||
endif
|
||||
|
||||
if [ -d "$(1)/pkg/$(4)$(if $(5),_$(5))" ]; then \
|
||||
$(INSTALL_DIR) "$(2)/lib/go-$(3)/pkg" ; \
|
||||
$(CP) "$(1)/pkg/$(4)$(if $(5),_$(5))" "$(2)/lib/go-$(3)/pkg/" ; \
|
||||
fi
|
||||
|
||||
$(INSTALL_DIR) "$(2)/lib/go-$(3)/pkg/tool/$(4)"
|
||||
$(INSTALL_BIN) -p "$(1)/pkg/tool/$(4)"/* "$(2)/lib/go-$(3)/pkg/tool/$(4)/"
|
||||
endef
|
||||
@@ -148,7 +153,7 @@ define GoCompiler/AddProfile
|
||||
|
||||
# $$(1) additional environment variables (optional)
|
||||
define GoCompiler/$(1)/Make
|
||||
$$(call GoCompiler/Default/Make,$(2),$(3),$(4),$$(1))
|
||||
$$(call GoCompiler/Default/Make,$(2),$$(1))
|
||||
endef
|
||||
|
||||
# $$(1) override install prefix (optional)
|
||||
|
||||
Reference in New Issue
Block a user