MCPcopy Create free account
hub / github.com/boostorg/build / construct

Method construct

v2/tools/symlink.py:48–64  ·  view source on GitHub ↗
(self, name, source_targets, ps)

Source from the content-addressed store, hash-verified

46 self.virtual_targets = []
47
48 def construct(self, name, source_targets, ps):
49 i = 0
50 for t in source_targets:
51 s = self.targets[i]
52 a = virtual_target.Action(self.manager(), [t], "symlink.ln", ps)
53 vt = virtual_target.FileTarget(os.path.basename(s), t.type(), self.project(), a)
54
55 # Place the symlink in the directory relative to the project
56 # location, instead of placing it in the build directory.
57 if not ps.get('symlink-location') == "project-relative":
58 vt.set_path(os.path.join(self.project().get('location'), os.path.dirname(s)))
59
60 vt = get_manager().virtual_targets().register(vt)
61 self.virtual_targets.append(vt)
62 i = i + 1
63
64 return (property_set.empty(), self.virtual_targets)
65
66# Creates a symbolic link from a set of targets to a set of sources.
67# The targets and sources map one to one. The symlinks generated are

Callers

nothing calls this directly

Calls 6

get_managerFunction · 0.90
getMethod · 0.80
virtual_targetsMethod · 0.80
appendMethod · 0.80
emptyMethod · 0.80
registerMethod · 0.45

Tested by

no test coverage detected