def add_build(self, node): if not node.has_builder(): return False if isinstance(node, SCons.Node.Alias.Alias): build = alias_to_ninja_build(node) else: build = self.translator.action_to_ninja_build(node) # Some things are unbuild-able or need not be built in Ninja if build is None: return False node_string = str(node) if node_string in self.builds: raise InternalError( "Node {} added to ninja build state more than once".format( node_string)) self.builds[node_string] = build self.built.update(build["outputs"]) return True
def __nonzero__(self): raise InternalError( "Do not test for the Node.builder attribute directly; use Node.has_builder() instead" )