(spec)
return targets
Return a list of MSBuild targets for external builders.

  The "Build" and "Clean" targets are always generated.  If the spec contains
  'msvs_external_builder_clcompile_cmd', then the "ClCompile" target will also
  be generated, to support building selected C/C++ files.

  Arguments:
    spec: The gyp target spec.
  Returns:
    List of MSBuild 'Target' specs.
Return a list of MSBuild targets for external builders.
Return a list of MSBuild targets for external builders .
def _GetMSBuildExternalBuilderTargets(spec):
  """Return a list of MSBuild targets for external builders.

  The "Build" and "Clean" targets are always generated.  If the spec contains
  'msvs_external_builder_clcompile_cmd', then the "ClCompile" target will also
  be generated, to support building selected C/C++ files.

  Arguments:
    spec: The gyp target spec.
  Returns:
    List of MSBuild 'Target' specs.
  """
  build_cmd = _BuildCommandLineForRuleRaw(
      spec, spec['msvs_external_builder_build_cmd'],
      False, False, False, False)
  build_target = ['Target', {'Name': 'Build'}]
  build_target.append(['Exec', {'Command': build_cmd}])

  clean_cmd = _BuildCommandLineForRuleRaw(
      spec, spec['msvs_external_builder_clean_cmd'],
      False, False, False, False)
  clean_target = ['Target', {'Name': 'Clean'}]
  clean_target.append(['Exec', {'Command': clean_cmd}])

  targets = [build_target, clean_target]

  if spec.get('msvs_external_builder_clcompile_cmd'):
    clcompile_cmd = _BuildCommandLineForRuleRaw(
        spec, spec['msvs_external_builder_clcompile_cmd'],
        False, False, False, False)
    clcompile_target = ['Target', {'Name': 'ClCompile'}]
    clcompile_target.append(['Exec', {'Command': clcompile_cmd}])
    targets.append(clcompile_target)

  return targets
def _GetMSBuildExternalBuilderTargets ( spec ) : build_cmd = _BuildCommandLineForRuleRaw ( spec , spec [ 'msvs_external_builder_build_cmd' ] , False , False , False , False ) build_target = [ 'Target' , { 'Name' : 'Build' } ] build_target . append ( [ 'Exec' , { 'Command' : build_cmd } ] ) clean_cmd = _BuildCommandLineForRuleRaw ( spec , spec [ 'msvs_external_builder_clean_cmd' ] , False , False , False , False ) clean_target = [ 'Target' , { 'Name' : 'Clean' } ] clean_target . append ( [ 'Exec' , { 'Command' : clean_cmd } ] ) targets = [ build_target , clean_target ] if spec . get ( 'msvs_external_builder_clcompile_cmd' ) : clcompile_cmd = _BuildCommandLineForRuleRaw ( spec , spec [ 'msvs_external_builder_clcompile_cmd' ] , False , False , False , False ) clcompile_target = [ 'Target' , { 'Name' : 'ClCompile' } ] clcompile_target . append ( [ 'Exec' , { 'Command' : clcompile_cmd } ] ) targets . append ( clcompile_target ) return targets