parameters: (target_list, target_dicts, data, params)
docstring: Called by gyp as the final stage. Outputs results.
docstring_summary: Called by gyp as the final stage. Outputs results.
docstring_tokens: Called by gyp as the final stage . Outputs results .
function: def GenerateOutput(target_list, target_dicts, data, params):
    """Called by gyp as the final stage. Outputs results."""
    config = Config()
    try:
      config.Init(params)
  
      if not config.files:
        raise Exception('Must specify files to analyze via config_path generator '
                        'flag')
  
      toplevel_dir = _ToGypPath(os.path.abspath(params['options'].toplevel_dir))
      if debug:
        print 'toplevel_dir', toplevel_dir
  
      if _WasGypIncludeFileModified(params, config.files):
        result_dict = { 'status': all_changed_string,
                        'test_targets': list(config.test_target_names),
                        'compile_targets': list(
                          config.additional_compile_target_names |
                          config.test_target_names) }
        _WriteOutput(params, **result_dict)
        return
  
      calculator = TargetCalculator(config.files,
                                    config.additional_compile_target_names,
                                    config.test_target_names, data,
                                    target_list, target_dicts, toplevel_dir,
                                    params['build_files'])
      if not calculator.is_build_impacted():
        result_dict = { 'status': no_dependency_string,
                        'test_targets': [],
                        'compile_targets': [] }
        if calculator.invalid_targets:
          result_dict['invalid_targets'] = calculator.invalid_targets
        _WriteOutput(params, **result_dict)
        return
  
      test_target_names = calculator.find_matching_test_target_names()
      compile_target_names = calculator.find_matching_compile_target_names()
      found_at_least_one_target = compile_target_names or test_target_names
      result_dict = { 'test_targets': test_target_names,
                      'status': found_dependency_string if
                          found_at_least_one_target else no_dependency_string,
                      'compile_targets': list(
                          set(compile_target_names) |
                          set(test_target_names)) }
      if calculator.invalid_targets:
        result_dict['invalid_targets'] = calculator.invalid_targets
      _WriteOutput(params, **result_dict)
  
    except Exception as e:
      _WriteOutput(params, error=str(e))
function_tokens: def GenerateOutput ( target_list , target_dicts , data , params ) : config = Config ( ) try : config . Init ( params ) if not config . files : raise Exception ( 'Must specify files to analyze via config_path generator ' 'flag' ) toplevel_dir = _ToGypPath ( os . path . abspath ( params [ 'options' ] . toplevel_dir ) ) if debug : print 'toplevel_dir' , toplevel_dir if _WasGypIncludeFileModified ( params , config . files ) : result_dict = { 'status' : all_changed_string , 'test_targets' : list ( config . test_target_names ) , 'compile_targets' : list ( config . additional_compile_target_names | config . test_target_names ) } _WriteOutput ( params , * * result_dict ) return calculator = TargetCalculator ( config . files , config . additional_compile_target_names , config . test_target_names , data , target_list , target_dicts , toplevel_dir , params [ 'build_files' ] ) if not calculator . is_build_impacted ( ) : result_dict = { 'status' : no_dependency_string , 'test_targets' : [ ] , 'compile_targets' : [ ] } if calculator . invalid_targets : result_dict [ 'invalid_targets' ] = calculator . invalid_targets _WriteOutput ( params , * * result_dict ) return test_target_names = calculator . find_matching_test_target_names ( ) compile_target_names = calculator . find_matching_compile_target_names ( ) found_at_least_one_target = compile_target_names or test_target_names result_dict = { 'test_targets' : test_target_names , 'status' : found_dependency_string if found_at_least_one_target else no_dependency_string , 'compile_targets' : list ( set ( compile_target_names ) | set ( test_target_names ) ) } if calculator . invalid_targets : result_dict [ 'invalid_targets' ] = calculator . invalid_targets _WriteOutput ( params , * * result_dict ) except Exception as e : _WriteOutput ( params , error = str ( e ) )