def run(self, project, name, ps, sources): pass action_name = ps.get('action')[0] if action_name[0] == '@': action = virtual_target.Action(get_manager(), sources, action_name[1:], ps) else: action = virtual_target.Action(get_manager(), sources, "notfile.run", ps) return [get_manager().virtual_targets().register( virtual_target.NotFileTarget(name, project, action))]
def symlink(name, project, source, ps): a = virtual_target.Action([source], "symlink.ln", ps) return virtual_target.FileTarget(name, source.type(), project, a, exact=True)
def construct(self, name, source_targets, ps): i = 0 for t in source_targets: s = self.targets[i] a = virtual_target.Action(self.manager(), [t], "symlink.ln", ps) vt = virtual_target.FileTarget(os.path.basename(s), t.type(), self.project(), a) # Place the symlink in the directory relative to the project # location, instead of placing it in the build directory. if not ps.get('symlink-location') == "project-relative": vt.set_path(os.path.join(self.project().get('location'), os.path.dirname(s))) vt = get_manager().virtual_targets().register(vt) self.virtual_targets.append(vt) i = i + 1 return (property_set.empty(), self.virtual_targets)