@ -160,7 +160,7 @@ define GoPackage/GoSubMenu
CATEGORY:= Languages
CATEGORY:= Languages
e n d e f
e n d e f
d e f i n e G o P a c k a g e / E n v i r o n m e n t / T a r g e t
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) "
e n d e f
d e f i n e G o P a c k a g e / E n v i r o n m e n t / B u i l d
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
e n d e f
d e f i n e G o P a c k a g e / E n v i r o n m e n t / D e f a u l t
$( call GoPackage/Environment/Target) \
$( call GoPackage/Environment/Build)
e n d e f
GO_PKG_DEFAULT_VARS = \
$( GO_PKG_TARGET_VARS) \
$( GO_PKG_BUILD_VARS)
GO_PKG_VARS = $( GO_PKG_DEFAULT_VARS)
G o P a c k a g e / Environment = $( call GoPackage/Environment/Default)
# do not use for new code; this will be removed after the next OpenWrt release
G o P a c k a g e / Environment = $( GO_PKG_VARS)
# false if directory does not exist
# false if directory does not exist
G o P a c k a g e / is_dir_not_empty = $$ $$ ( $( FIND) $( 1) -maxdepth 0 -type d \! -empty 2>/dev/null)
G o P a c k a g e / is_dir_not_empty = $$ $$ ( $( FIND) $( 1) -maxdepth 0 -type d \! -empty 2>/dev/null)
@ -273,7 +273,7 @@ endef
d e f i n e G o P a c k a g e / B u i l d / C o m p i l e
d e f i n e G o P a c k a g e / B u i l d / C o m p i l e
( \
( \
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) ) ; \