def construct (self, properties = [], targets = []): """ Constructs the dependency graph. properties: the build properties. targets: the targets to consider. If none is specified, uses all. """ if not targets: for name, project in self.projects ().projects (): targets.append (project.target ()) property_groups = build_request.expand_no_defaults (properties) virtual_targets = [] build_prop_sets = [] for p in property_groups: build_prop_sets.append (property_set.create (feature.split (p))) if not build_prop_sets: build_prop_sets = [property_set.empty ()] for build_properties in build_prop_sets: for target in targets: result = target.generate (build_properties) virtual_targets.extend (result.targets ()) actual_targets = [] for virtual_target in virtual_targets: actual_targets.extend (virtual_target.actualize ())
def __init__ (self, engine, global_build_dir): """ Constructor. engine: the build engine that will actually construct the targets. """ from build.virtual_target import VirtualTargetRegistry from build.targets import TargetRegistry from build.project import ProjectRegistry from build.scanner import ScannerRegistry from build.errors import Errors from b2.util.logger import NullLogger from build import build_request, property_set, feature self.engine_ = engine self.virtual_targets_ = VirtualTargetRegistry (self) self.projects_ = ProjectRegistry (self, global_build_dir) self.targets_ = TargetRegistry () self.logger_ = NullLogger () self.scanners_ = ScannerRegistry (self) self.argv_ = bjam.variable("ARGV") self.boost_build_path_ = bjam.variable("BOOST_BUILD_PATH") self.errors_ = Errors() self.command_line_free_features_ = property_set.empty() # Object Map. # TODO: This is a kludge: maps object names to the actual instances. # Sometimes, objects are stored in properties, along with some grist. # This map is used to store the value and return an id, which can be later on used to retriev it back. self.object_map_ = {} global the_manager the_manager = self
def __init__ (self, engine, global_build_dir): """ Constructor. engine: the build engine that will actually construct the targets. """ from build.virtual_target import VirtualTargetRegistry from build.targets import TargetRegistry from build.project import ProjectRegistry from build.scanner import ScannerRegistry from build.errors import Errors from b2.util.logger import NullLogger from build import build_request, property_set, feature self.engine_ = engine self.virtual_targets_ = VirtualTargetRegistry (self) self.projects_ = ProjectRegistry (self, global_build_dir) self.targets_ = TargetRegistry () self.logger_ = NullLogger () self.scanners_ = ScannerRegistry (self) self.argv_ = bjam.variable("ARGV") self.boost_build_path_ = bjam.variable("BOOST_BUILD_PATH") self.errors_ = Errors() self.command_line_free_features_ = property_set.empty() global the_manager the_manager = self