--- a/targets/toolchain_makefile.py Thu Feb 17 15:59:56 2011 +0100
+++ b/targets/toolchain_makefile.py Thu Feb 17 16:38:42 2011 +0100
@@ -1,4 +1,4 @@
from wxPopen import ProcessLogger
@@ -33,16 +33,32 @@
+ def concat_deps(self, bn): + src = open(os.path.join(self.buildpath, bn),"r").read() + # update direct dependencies + for l in src.splitlines(): + res = includes_re.match(l) + depfn = res.groups()[0] + if os.path.exists(os.path.join(self.buildpath, depfn)): + #print bn + " depends on "+depfn + # TODO detect cicular deps. + return reduce(operator.concat, map(self.concat_deps, deps), src) - print self.PluginsRootInstance.LocationCFilesAndCFLAGS
for Location, CFilesAndCFLAGS, DoCalls in self.PluginsRootInstance.LocationCFilesAndCFLAGS:
# Get CFiles list to give it to makefile
for CFile, CFLAGS in CFilesAndCFLAGS:
CFileName = os.path.basename(CFile)
- wholesrcdata += open(CFile, "r").read()
+ wholesrcdata += self.concat_deps(CFileName) + #wholesrcdata += open(CFile, "r").read() srcfiles.append(CFileName)