Move dependencies declaration of a target into the builder.

This is the builder that depends on other target, not the target itself.
This commit is contained in:
Matthieu Gautier
2018-05-28 11:44:54 +02:00
parent 7e0b403ccc
commit 115fbfa147
14 changed files with 72 additions and 63 deletions

View File

@ -32,12 +32,12 @@ class Builder:
targetClass = Dependency.all_deps[targetName]
target = targetClass(self.buildEnv)
targets[targetName] = target
for dep in target.dependencies:
for dep in target.builder.get_dependencies(self.platform):
self.add_targets(dep, targets)
def order_dependencies(self, _targets, targetName):
target = _targets[targetName]
for depName in target.dependencies:
for depName in target.builder.dependencies(self.platform):
yield from self.order_dependencies(_targets, depName)
yield targetName