diff options
Diffstat (limited to 'meta/classes/go.bbclass')
-rw-r--r-- | meta/classes/go.bbclass | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index f64b07fd82..6df73bf377 100644 --- a/meta/classes/go.bbclass +++ b/meta/classes/go.bbclass | |||
@@ -51,14 +51,14 @@ FILES_${PN}-staticdev += "${GOPKG_FINAL}/${GO_IMPORT}*" | |||
51 | 51 | ||
52 | GO_INSTALL ?= "${GO_IMPORT}/..." | 52 | GO_INSTALL ?= "${GO_IMPORT}/..." |
53 | 53 | ||
54 | do_go_compile() { | 54 | go_do_compile() { |
55 | GOPATH=${S}:${STAGING_LIBDIR}/${TARGET_SYS}/go go env | 55 | GOPATH=${S}:${STAGING_LIBDIR}/${TARGET_SYS}/go go env |
56 | if [ -n "${GO_INSTALL}" ]; then | 56 | if [ -n "${GO_INSTALL}" ]; then |
57 | GOPATH=${S}:${STAGING_LIBDIR}/${TARGET_SYS}/go go install ${GOBUILDFLAGS} ${GO_INSTALL} | 57 | GOPATH=${S}:${STAGING_LIBDIR}/${TARGET_SYS}/go go install ${GOBUILDFLAGS} ${GO_INSTALL} |
58 | fi | 58 | fi |
59 | } | 59 | } |
60 | 60 | ||
61 | do_go_install() { | 61 | go_do_install() { |
62 | rm -rf ${WORKDIR}/staging | 62 | rm -rf ${WORKDIR}/staging |
63 | install -d ${WORKDIR}/staging${GOROOT_FINAL} ${D}${GOROOT_FINAL} | 63 | install -d ${WORKDIR}/staging${GOROOT_FINAL} ${D}${GOROOT_FINAL} |
64 | tar -C ${S} -cf - . | tar -C ${WORKDIR}/staging${GOROOT_FINAL} -xpvf - | 64 | tar -C ${S} -cf - . | tar -C ${WORKDIR}/staging${GOROOT_FINAL} -xpvf - |
@@ -84,11 +84,7 @@ do_go_install() { | |||
84 | rmdir -p "${D}${GOBIN_FINAL}" || true | 84 | rmdir -p "${D}${GOBIN_FINAL}" || true |
85 | fi | 85 | fi |
86 | } | 86 | } |
87 | do_install[dirs] =+ "${WORKDIR}/staging" | ||
88 | do_install[cleandirs] += "${WORKDIR}/staging" | ||
87 | 89 | ||
88 | do_compile() { | 90 | EXPORT_FUNCTIONS do_compile do_install |
89 | do_go_compile | ||
90 | } | ||
91 | |||
92 | do_install() { | ||
93 | do_go_install | ||
94 | } | ||