def __init__(self, project, name, template = None, configName = None):
    self.project = project
    
    if template:
      assert template in project.targets
      self.config  = project.targets[template].config
      self.library = project.targets[template].library
    else:
      self.config  = project.config
      self.library = project.library
      
    # Create local copies of things we're going to modify
    self.config   = copy.deepcopy(self.config)
    self.library  = copy.deepcopy(self.library)
    self.name     = name
    
    # Read the target-specific configuration
    if configName is None:
      configName = self.name
    
    conf = Resource.getPath("targets", "%s.conf" % configName, required = False)
    if conf:
      self.config.loadFile(conf)

    if self.project.platform.name in self.config:
      # First merge the target config into the platform config
      if self.name in self.config[self.project.platform.name]:
        self.config[self.project.platform.name].merge(self.config[self.project.platform.name][self.name])

      # Then merge the platform config to the global config
      self.config.merge(self.config[self.project.platform.name])

      # Remove the platform specific section since we won't need it anymore
      del self.config[self.project.platform.name]

    if self.name in self.config:
      # Finally merge the target config to the global config
      self.config.merge(self.config[self.name])

      # Remove the target specific section since we won't need it anymore
      del self.config[self.name]
Constructor.
dataset/ETHPy150Open skyostil/tracy/src/generator/Target.py/Target.__init__