Hello,
I have a problem in the new build system, which I am not able to solve
with my novice waf knowledge.
You can check out the prototype with these steps:
git clone git://git.rtems.org/sebh/rtems.git
cd rtems
git checkout --track origin/build
./waf bsp_defaults --rtems-bsps=sparc > bsps.ini
./waf configure
./waf
To build a test executable, we need:
1. the test program objects,
2. the libraries, e.g. librtemscpu.a and librtemsbsp.a
3. the linker command file (source or configuration file, see
ConfigFileItem in wscript)
4. the start file start.o
The dependencies on 1. and 2. work. The 3. is basically read-only for a
build. The problem is 4.
The start file is build with:
class StartItem(Item):
def __init__(self, uid, data):
super(StartItem, self).__init__(uid, data)
def build(self, bld):
bld(
rule="${CC} -DASM ${CFLAGS} ${CPPFLAGS}
${DEFINES_ST:DEFINES} ${CPPPATH_ST:INCPATHS} -c -o ${TGT} ${SRC}",
source=self.data["source"],
target=self.data["target"],
name=self.uid,
features="asm",
includes=bld.env.INCLUDES,
before=["cstlib"],
)
The test executables are built with:
class ExecutableItem(Item):
def __init__(self, uid, data):
super(ExecutableItem, self).__init__(uid, data)
executables.append(self)
def build(self, bld):
if self.is_enabled(bld):
includes = bld.env["INCLUDES"]
bld.env["INCLUDES"] = (
includes + bld.bsp_includes +
["testsuites/support/include"]
)
bld.use = ["rtemstest", "rtemscpu", "rtemsbsp"]
for p in self.links():
p.build(bld)
bld.env["INCLUDES"] = includes
bld(
target=self.data["target"] + ".exe",
use=bld.use,
features="c cprogram",
)
del bld.use
How can I add a dependency on start.o to the test executables? I tried
several variants of bld.add_manual_dependency(), but nothing worked.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel