Example #1
0
 def all_target_directories(self, target_type = None):
     assert isinstance(target_type, (basestring, type(None)))
     # TODO: does not appear to use target_type in deciding
     # if we've computed this already.
     if not self.target_directories_:
         self.target_directories_ = self.compute_target_directories(target_type)
     return self.target_directories_
Example #2
0
 def root (self, set = None):
     """ Sets/gets the 'root' flag. Target is root is it directly correspods to some
         variant of a main target.
     """
     assert isinstance(set, (int, bool, type(None)))
     if set:
         self.root_ = True
     return self.root_
Example #3
0
 def root(self, set=None):
     """ Sets/gets the 'root' flag. Target is root is it directly correspods to some
         variant of a main target.
     """
     assert isinstance(set, (int, bool, type(None)))
     if set:
         self.root_ = True
     return self.root_
Example #4
0
 def all_target_directories(self, target_type=None):
     assert isinstance(target_type, (basestring, type(None)))
     # TODO: does not appear to use target_type in deciding
     # if we've computed this already.
     if not self.target_directories_:
         self.target_directories_ = self.compute_target_directories(
             target_type)
     return self.target_directories_
Example #5
0
    def compute_target_directories(self, target_type=None):
        assert isinstance(target_type, (basestring, type(None)))
        result = []
        for t in self.created_targets():
            if not target_type or b2.build.type.is_derived(t.type(), target_type):
                result.append(t.path())

        for d in self.other_dg_:
            result.extend(d.all_target_directories(target_type))

        result = unique(result)
        return result
    def compute_target_directories(self, target_type=None):
        assert isinstance(target_type, (basestring, type(None)))
        result = []
        for t in self.created_targets():
            if not target_type or b2.build.type.is_derived(t.type(), target_type):
                result.append(t.path())

        for d in self.other_dg_:
            result.extend(d.all_target_directories(target_type))

        result = unique(result)
        return result
Example #7
0
    def __init__ (self, manager, sources, action_name, prop_set):
        assert(isinstance(prop_set, property_set.PropertySet))
        assert type(sources) == types.ListType
        self.sources_ = sources
        self.action_name_ = action_name
        if not prop_set:
            prop_set = property_set.empty()
        self.properties_ = prop_set
        if not all(isinstance(v, VirtualTarget) for v in prop_set.get('implicit-dependency')):
            import pdb
            pdb.set_trace()

        self.manager_ = manager
        self.engine_ = self.manager_.engine ()
        self.targets_ = []

        # Indicates whether this has been actualized or not.
        self.actualized_ = False

        self.dependency_only_sources_ = []
        self.actual_sources_ = []