def BuildTargetsDict(data):
 targets = {}
 for build_file in data['target_build_files']:
  for target in data[build_file].get('targets', []):
   target_name = gyp.common.QualifiedTarget(build_file, target['target_name'], target['toolset'])
   if (target_name in targets):
    raise GypError(('Duplicate target definitions for ' + target_name))
   targets[target_name] = target
 return targets

def BuildTargetsDict ( data ) : targets = { } for build_file in data [ 'target_build_files' ] : for target in data [ build_file ] . get ( 'targets' , [ ] ) : target_name = gyp . common . QualifiedTarget ( build_file , target [ 'target_name' ] , target [ 'toolset' ] ) if ( target_name in targets ) : raise GypError ( ( 'Duplicate target definitions for ' + target_name ) ) targets [ target_name ] = target return targets
builds a dict mapping fully-qualified target names to their target dicts .