From 7dc1f3e0293588ebc544e8eee104043dd0dacaf5 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Sat, 9 Feb 2019 20:00:56 +0800 Subject: [PATCH] golang: Install go.mod/go.sum by default Signed-off-by: Jeffery To --- lang/golang/golang-package.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lang/golang/golang-package.mk b/lang/golang/golang-package.mk index 3c1137b94..887d54dad 100644 --- a/lang/golang/golang-package.mk +++ b/lang/golang/golang-package.mk @@ -32,6 +32,8 @@ include $(GO_INCLUDE_DIR)/golang-values.mk # # * Files in any 'testdata' directory # +# * go.mod and go.sum, in any directory +# # e.g. GO_PKG_INSTALL_EXTRA:=example.toml marshal_test.toml # # @@ -155,12 +157,13 @@ define GoPackage/Build/Configure if [ "$(GO_PKG_INSTALL_ALL)" != 1 ]; then \ code=$$$$(echo "$$$$files" | grep '\.\(c\|cc\|cpp\|go\|h\|hh\|hpp\|proto\|s\)$$$$') ; \ testdata=$$$$(echo "$$$$files" | grep '\(^\|/\)testdata/') ; \ + gomod=$$$$(echo "$$$$files" | grep '\(^\|/\)go\.\(mod\|sum\)$$$$') ; \ \ for pattern in $(GO_PKG_INSTALL_EXTRA); do \ extra=$$$$(echo "$$$$extra"; echo "$$$$files" | grep "$$$$pattern") ; \ done ; \ \ - files=$$$$(echo "$$$$code"; echo "$$$$testdata"; echo "$$$$extra") ; \ + files=$$$$(echo "$$$$code"; echo "$$$$testdata"; echo "$$$$gomod"; echo "$$$$extra") ; \ files=$$$$(echo "$$$$files" | grep -v '^[[:space:]]*$$$$' | sort -u) ; \ fi ; \ \