[oe] Writing a test program for libserial

Phil Blundell pb at reciva.com
Sun Jun 21 10:05:52 UTC 2009


On Sun, 2009-06-21 at 12:25 +0400, Elvis Dowson wrote:
> If I compare with the other recipes, I don't see the output files in  
> the root folder of the work/recipe i.e. work/armv7a-angstrom-linux- 
> gnueabi/libserial-test-1.6.0-r0/ doesn't contain the output files.

That's just caused by the layout of your source code (loose files in
SRC_URI rather than a tarball).  It isn't anything to worry about.

> This is cause by my do_compile () code, i think
> 
> do_compile () {
>     ${CXX} ${CXXFLAGS} ${LDFLAGS} ${WORKDIR}/src/read_port.cpp -o  
> libserial-test-read-port
>     ${CXX} ${CXXFLAGS} ${LDFLAGS} ${WORKDIR}/src/write_port.cpp -o  
> libserial-test-write-port
> }

If you wanted to, you could change this to "-o
src/libserial-test-write-port" to make the binaries go into the src/
subfolder.  Of course, then you'd need to adjust your do_install()
method to look for them there rather than in ${WORKDIR}.  Personally I
wouldn't bother: it's fine as it stands.

Also, just as an aside, you don't need to specify the full path to the
source files (i.e. starting with ${WORKDIR}).  The do_compile() method
runs with ${S} as the current directory so you can just refer to them
with relative pathnames if you want.

> inherit autotools_stage
> AUTOTOOLS_STAGE_PKGCONFIG = 1
> 
> do_stage() {
> 	autotools_stage_all
> }

These lines are unnecessary: your recipe doesn't have anything to stage
and, even if it did, it isn't using autotools so these lines wouldn't
help.  You might as well delete them.

p.






More information about the Openembedded-devel mailing list