Simple installation of native script for use in other recipe

Viewed 4089

I need to install a native script, call it foo, in one recipe (foo-native) and then use it in the do_compile step of another (target) recipe - call it bar.

My (minimal) native recipe

SRC_URI = "file://foo"
LICENSE = "CLOSED"

inherit native

BBCLASSEXTEND = "native"

S = "${WORKDIR}"

do_compile() { 
    : 
}

do_install() {
    install -d ${D}/usr/bin
    install ${WORKDIR}/foo ${D}/usr/bin
}

The script, foo, exists in a directory called files which resides next to the recipe. i.e.

foo/
├── files
│   └── foo
└── foo.bb

My target recipe for bar

SRC_URI = ""
LICENSE = "CLOSED"

DEPENDS = "foo-native"

do_fetch[noexec] = "1"
do_configure[noexec] = "1"

do_compile() {
    foo >myfile.json
}

do_install() {
    install -d ${D}/etc
    install ${WORKDIR}/myfile.json ${D}/etc
}

The error I get is in the do_compile task of bar, and it simply says that foo can not be found (i.e. has not been installed into a directory on the path).

1 Answers
Related