diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/go.bbclass | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index a01b28bccd..96302a187c 100644 --- a/meta/classes/go.bbclass +++ b/meta/classes/go.bbclass | |||
@@ -49,8 +49,8 @@ GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/" | |||
49 | B = "${WORKDIR}/build" | 49 | B = "${WORKDIR}/build" |
50 | export GOPATH = "${B}" | 50 | export GOPATH = "${B}" |
51 | export GOCACHE = "off" | 51 | export GOCACHE = "off" |
52 | GO_TMPDIR ?= "${WORKDIR}/go-tmp" | 52 | export GOTMPDIR ?= "${WORKDIR}/go-tmp" |
53 | GO_TMPDIR[vardepvalue] = "" | 53 | GOTMPDIR[vardepvalue] = "" |
54 | 54 | ||
55 | python go_do_unpack() { | 55 | python go_do_unpack() { |
56 | src_uri = (d.getVar('SRC_URI') or "").split() | 56 | src_uri = (d.getVar('SRC_URI') or "").split() |
@@ -85,9 +85,10 @@ go_list_package_tests() { | |||
85 | go_do_configure() { | 85 | go_do_configure() { |
86 | ln -snf ${S}/src ${B}/ | 86 | ln -snf ${S}/src ${B}/ |
87 | } | 87 | } |
88 | do_configure[dirs] =+ "${GOTMPDIR}" | ||
88 | 89 | ||
89 | go_do_compile() { | 90 | go_do_compile() { |
90 | export TMPDIR="${GO_TMPDIR}" | 91 | export TMPDIR="${GOTMPDIR}" |
91 | ${GO} env | 92 | ${GO} env |
92 | if [ -n "${GO_INSTALL}" ]; then | 93 | if [ -n "${GO_INSTALL}" ]; then |
93 | if [ -n "${GO_LINKSHARED}" ]; then | 94 | if [ -n "${GO_LINKSHARED}" ]; then |
@@ -97,11 +98,11 @@ go_do_compile() { | |||
97 | ${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} `go_list_packages` | 98 | ${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} `go_list_packages` |
98 | fi | 99 | fi |
99 | } | 100 | } |
100 | do_compile[dirs] =+ "${GO_TMPDIR}" | 101 | do_compile[dirs] =+ "${GOTMPDIR}" |
101 | do_compile[cleandirs] = "${B}/bin ${B}/pkg" | 102 | do_compile[cleandirs] = "${B}/bin ${B}/pkg" |
102 | 103 | ||
103 | do_compile_ptest() { | 104 | do_compile_ptest() { |
104 | export TMPDIR="${GO_TMPDIR}" | 105 | export TMPDIR="${GOTMPDIR}" |
105 | rm -f ${B}/.go_compiled_tests.list | 106 | rm -f ${B}/.go_compiled_tests.list |
106 | go_list_package_tests | while read pkg; do | 107 | go_list_package_tests | while read pkg; do |
107 | cd ${B}/src/$pkg | 108 | cd ${B}/src/$pkg |
@@ -110,7 +111,7 @@ do_compile_ptest() { | |||
110 | sed -e's,/\./,/,'>> ${B}/.go_compiled_tests.list | 111 | sed -e's,/\./,/,'>> ${B}/.go_compiled_tests.list |
111 | done | 112 | done |
112 | } | 113 | } |
113 | do_compile_ptest_base[dirs] =+ "${GO_TMPDIR}" | 114 | do_compile_ptest_base[dirs] =+ "${GOTMPDIR}" |
114 | 115 | ||
115 | go_do_install() { | 116 | go_do_install() { |
116 | install -d ${D}${libdir}/go/src/${GO_IMPORT} | 117 | install -d ${D}${libdir}/go/src/${GO_IMPORT} |