code: def __construct_really (project, name, target_type, prop_set, sources):
      
      if __debug__:
          from .targets import ProjectTarget
          assert isinstance(project, ProjectTarget)
          assert isinstance(name, basestring) or name is None
          assert isinstance(target_type, basestring)
          assert isinstance(prop_set, property_set.PropertySet)
          assert is_iterable_typed(sources, virtual_target.VirtualTarget)
      viable_generators = find_viable_generators (target_type, prop_set)
  
      result = []
  
      dout("      *** %d viable generators" % len (viable_generators))
  
      generators_that_succeeded = []
  
      for g in viable_generators:
          __active_generators.append(g)
          r = try_one_generator (project, name, g, target_type, prop_set, sources)
          del __active_generators[-1]
  
          if r:
              generators_that_succeeded.append(g)
              if result:
                  output = cStringIO.StringIO()
                  print >>output, "ambiguity found when searching for best transformation"
                  print >>output, "Trying to produce type '%s' from: " % (target_type)
                  for s in sources:
                      print >>output, " - " + s.str()
                  print >>output, "Generators that succeeded:"
                  for g in generators_that_succeeded:
                      print >>output, " - " + g.id()
                  print >>output, "First generator produced: "
                  for t in result[1:]:
                      print >>output, " - " + str(t)
                  print >>output, "Second generator produced:"
                  for t in r[1:]:
                      print >>output, " - " + str(t)
                  get_manager().errors()(output.getvalue())
              else:
                  result = r;
  
      return result;
docs: Attempts to construct target by finding viable generators, running them
          and selecting the dependency graph.