- # meta-test-layer/recipes-example/example/example_0.1.bb:
- #
- # This file was derived from the 'Hello World!' example recipe in the
- # Yocto Project Development Manual.
- #
- SUMMARY = "Simple helloworld application"
- SECTION = "examples"
- LICENSE = "MIT"
- LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
- #SRC_URI = ""
- inherit my-test
- S = "${WORKDIR}"
- do_compile() {
- ${CC} helloworld.c -o helloworld
- }
- do_install() {
- install -d ${D}${bindir}
- install -m 0755 helloworld ${D}${bindir}
- }
- #--------------------------------------------------
- # meta-test-layer/classes/my-test.bbclass:
- # The build works with the following anonymous function:
- #python () {
- # d.setVar("SRC_URI", "file://helloworld.c")
- #}
- # But does not work with these tasks, why not?
- python do_fix_src_uri () {
- d.setVar("SRC_URI", "file://helloworld.c")
- }
- python do_check_src_uri () {
- print d.getVar("SRC_URI")
- }
- addtask fix_src_uri before do_check_src_uri
- addtask check_src_uri after do_fix_src_uri before do_fetch
- # --------------------------------------------------------
- # build/tmp/work/i586-poky-linux/example/0.1-r0/temp/log.do_check_src_uri
- DEBUG: Executing python function do_check_src_uri
- DEBUG: Python function do_check_src_uri finished
- #----------------------------------------------------------
- #build/tmp/work/i586-poky-linux/example/0.1-r0/temp/log.task_order:
- do_fix_src_uri (3767): log.do_fix_src_uri.3767
- do_check_src_uri (3768): log.do_check_src_uri.3768
- do_fetch (3769): log.do_fetch.3769
- do_unpack (3770): log.do_unpack.3770
- do_patch (3771): log.do_patch.3771
- do_configure (3773): log.do_configure.3773
- do_populate_lic (3774): log.do_populate_lic.3774
- do_compile (3795): log.do_compile.3795