Returns the recursive list of target dependencies.
(target_dicts, roots)
| 292 | |
| 293 | |
| 294 | def DeepDependencyTargets(target_dicts, roots): |
| 295 | """Returns the recursive list of target dependencies.""" |
| 296 | dependencies = set() |
| 297 | pending = set(roots) |
| 298 | while pending: |
| 299 | # Pluck out one. |
| 300 | r = pending.pop() |
| 301 | # Skip if visited already. |
| 302 | if r in dependencies: |
| 303 | continue |
| 304 | # Add it. |
| 305 | dependencies.add(r) |
| 306 | # Add its children. |
| 307 | spec = target_dicts[r] |
| 308 | pending.update(set(spec.get("dependencies", []))) |
| 309 | pending.update(set(spec.get("dependencies_original", []))) |
| 310 | return list(dependencies - set(roots)) |
| 311 | |
| 312 | |
| 313 | def BuildFileTargets(target_list, build_file): |