summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMatt Madison <matt@madison.systems>2017-09-08 18:04:38 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-11 17:30:30 +0100
commit2381d15cc62a7ada15d9f8af39a0d32701282c3b (patch)
tree8cf76883615a5db87fb5fba348b03b774b7c600e /meta
parent6640f4070e5f3e97e84562a7646e655ee84c0eb5 (diff)
downloadpoky-2381d15cc62a7ada15d9f8af39a0d32701282c3b.tar.gz
go.bbclass: exported function cleanup
Since this is a class, it should follow the class function export mechanism for its task functions, and should set directory-related flags for directories they need. (From OE-Core rev: 0369a99ad1c9e3a9a6394c723461795460dc2c76) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/go.bbclass14
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
52GO_INSTALL ?= "${GO_IMPORT}/..." 52GO_INSTALL ?= "${GO_IMPORT}/..."
53 53
54do_go_compile() { 54go_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
61do_go_install() { 61go_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}
87do_install[dirs] =+ "${WORKDIR}/staging"
88do_install[cleandirs] += "${WORKDIR}/staging"
87 89
88do_compile() { 90EXPORT_FUNCTIONS do_compile do_install
89 do_go_compile
90}
91
92do_install() {
93 do_go_install
94}