gen.py 475 B

12345678910111213141516
  1. from b2.build.virtual_target import NonScanningAction, FileTarget
  2. def generate_example(project, name, ps, sources):
  3. result = []
  4. for s in sources:
  5. a = NonScanningAction([s], "common.copy", ps)
  6. # Create a target to represent the action result. Uses the target name
  7. # passed here via the 'name' parameter and the same type and project as
  8. # the source.
  9. result.append(FileTarget(name, s.type(), project, a))
  10. return result