parameters: (target, source, env)
return_statement: return (targetlist, sourcelist)
docstring: Sets up the DSP dependencies.
docstring_summary: Sets up the DSP dependencies.
docstring_tokens: Sets up the DSP dependencies .
function: def projectEmitter(target, source, env):
      """Sets up the DSP dependencies."""
  
      # todo: Not sure what sets source to what user has passed as target,
      # but this is what happens. When that is fixed, we also won't have
      # to make the user always append env['MSVSPROJECTSUFFIX'] to target.
      if source[0] == target[0]:
          source = []
  
      # make sure the suffix is correct for the version of MSVS we're running.
      (base, suff) = SCons.Util.splitext(str(target[0]))
      suff = env.subst('$MSVSPROJECTSUFFIX')
      target[0] = base + suff
  
      if not source:
          source = 'prj_inputs:'
          source = source + env.subst('$MSVSSCONSCOM', 1)
          source = source + env.subst('$MSVSENCODING', 1)
  
          # Project file depends on CPPDEFINES and CPPPATH
          preprocdefs = xmlify(';'.join(processDefines(env.get('CPPDEFINES', []))))
          includepath = xmlify(';'.join(processIncludes(env.get('CPPPATH', []), env, None, None)))
          source = source + "; ppdefs:%s incpath:%s"%(preprocdefs, includepath)
  
          if 'buildtarget' in env and env['buildtarget'] is not None:
              if SCons.Util.is_String(env['buildtarget']):
                  source = source + ' "%s"' % env['buildtarget']
              elif SCons.Util.is_List(env['buildtarget']):
                  for bt in env['buildtarget']:
                      if SCons.Util.is_String(bt):
                          source = source + ' "%s"' % bt
                      else:
                          try: source = source + ' "%s"' % bt.get_abspath()
                          except AttributeError: raise SCons.Errors.InternalError("buildtarget can be a string, a node, a list of strings or nodes, or None")
              else:
                  try: source = source + ' "%s"' % env['buildtarget'].get_abspath()
                  except AttributeError: raise SCons.Errors.InternalError("buildtarget can be a string, a node, a list of strings or nodes, or None")
  
          if 'outdir' in env and env['outdir'] is not None:
              if SCons.Util.is_String(env['outdir']):
                  source = source + ' "%s"' % env['outdir']
              elif SCons.Util.is_List(env['outdir']):
                  for s in env['outdir']:
                      if SCons.Util.is_String(s):
                          source = source + ' "%s"' % s
                      else:
                          try: source = source + ' "%s"' % s.get_abspath()
                          except AttributeError: raise SCons.Errors.InternalError("outdir can be a string, a node, a list of strings or nodes, or None")
              else:
                  try: source = source + ' "%s"' % env['outdir'].get_abspath()
                  except AttributeError: raise SCons.Errors.InternalError("outdir can be a string, a node, a list of strings or nodes, or None")
  
          if 'name' in env:
              if SCons.Util.is_String(env['name']):
                  source = source + ' "%s"' % env['name']
              else:
                  raise SCons.Errors.InternalError("name must be a string")
  
          if 'variant' in env:
              if SCons.Util.is_String(env['variant']):
                  source = source + ' "%s"' % env['variant']
              elif SCons.Util.is_List(env['variant']):
                  for variant in env['variant']:
                      if SCons.Util.is_String(variant):
                          source = source + ' "%s"' % variant
                      else:
                          raise SCons.Errors.InternalError("name must be a string or a list of strings")
              else:
                  raise SCons.Errors.InternalError("variant must be a string or a list of strings")
          else:
              raise SCons.Errors.InternalError("variant must be specified")
  
          for s in _DSPGenerator.srcargs:
              if s in env:
                  if SCons.Util.is_String(env[s]):
                      source = source + ' "%s' % env[s]
                  elif SCons.Util.is_List(env[s]):
                      for t in env[s]:
                          if SCons.Util.is_String(t):
                              source = source + ' "%s"' % t
                          else:
                              raise SCons.Errors.InternalError(s + " must be a string or a list of strings")
                  else:
                      raise SCons.Errors.InternalError(s + " must be a string or a list of strings")
  
          source = source + ' "%s"' % str(target[0])
          source = [SCons.Node.Python.Value(source)]
  
      targetlist = [target[0]]
      sourcelist = source
  
      if env.get('auto_build_solution', 1):
          env['projects'] = [env.File(t).srcnode() for t in targetlist]
          t, s = solutionEmitter(target, target, env)
          targetlist = targetlist + t
  
      # Beginning with Visual Studio 2010 for each project file (.vcxproj) we have additional file (.vcxproj.filters)
      version_num = 6.0
      if 'MSVS_VERSION' in env:
          version_num, suite = msvs_parse_version(env['MSVS_VERSION'])
      if version_num >= 10.0:
          targetlist.append(targetlist[0] + '.filters')
  
      return (targetlist, sourcelist)
function_tokens: def projectEmitter ( target , source , env ) : # todo: Not sure what sets source to what user has passed as target, # but this is what happens. When that is fixed, we also won't have # to make the user always append env['MSVSPROJECTSUFFIX'] to target. if source [ 0 ] == target [ 0 ] : source = [ ] # make sure the suffix is correct for the version of MSVS we're running. ( base , suff ) = SCons . Util . splitext ( str ( target [ 0 ] ) ) suff = env . subst ( '$MSVSPROJECTSUFFIX' ) target [ 0 ] = base + suff if not source : source = 'prj_inputs:' source = source + env . subst ( '$MSVSSCONSCOM' , 1 ) source = source + env . subst ( '$MSVSENCODING' , 1 ) # Project file depends on CPPDEFINES and CPPPATH preprocdefs = xmlify ( ';' . join ( processDefines ( env . get ( 'CPPDEFINES' , [ ] ) ) ) ) includepath = xmlify ( ';' . join ( processIncludes ( env . get ( 'CPPPATH' , [ ] ) , env , None , None ) ) ) source = source + "; ppdefs:%s incpath:%s" % ( preprocdefs , includepath ) if 'buildtarget' in env and env [ 'buildtarget' ] is not None : if SCons . Util . is_String ( env [ 'buildtarget' ] ) : source = source + ' "%s"' % env [ 'buildtarget' ] elif SCons . Util . is_List ( env [ 'buildtarget' ] ) : for bt in env [ 'buildtarget' ] : if SCons . Util . is_String ( bt ) : source = source + ' "%s"' % bt else : try : source = source + ' "%s"' % bt . get_abspath ( ) except AttributeError : raise SCons . Errors . InternalError ( "buildtarget can be a string, a node, a list of strings or nodes, or None" ) else : try : source = source + ' "%s"' % env [ 'buildtarget' ] . get_abspath ( ) except AttributeError : raise SCons . Errors . InternalError ( "buildtarget can be a string, a node, a list of strings or nodes, or None" ) if 'outdir' in env and env [ 'outdir' ] is not None : if SCons . Util . is_String ( env [ 'outdir' ] ) : source = source + ' "%s"' % env [ 'outdir' ] elif SCons . Util . is_List ( env [ 'outdir' ] ) : for s in env [ 'outdir' ] : if SCons . Util . is_String ( s ) : source = source + ' "%s"' % s else : try : source = source + ' "%s"' % s . get_abspath ( ) except AttributeError : raise SCons . Errors . InternalError ( "outdir can be a string, a node, a list of strings or nodes, or None" ) else : try : source = source + ' "%s"' % env [ 'outdir' ] . get_abspath ( ) except AttributeError : raise SCons . Errors . InternalError ( "outdir can be a string, a node, a list of strings or nodes, or None" ) if 'name' in env : if SCons . Util . is_String ( env [ 'name' ] ) : source = source + ' "%s"' % env [ 'name' ] else : raise SCons . Errors . InternalError ( "name must be a string" ) if 'variant' in env : if SCons . Util . is_String ( env [ 'variant' ] ) : source = source + ' "%s"' % env [ 'variant' ] elif SCons . Util . is_List ( env [ 'variant' ] ) : for variant in env [ 'variant' ] : if SCons . Util . is_String ( variant ) : source = source + ' "%s"' % variant else : raise SCons . Errors . InternalError ( "name must be a string or a list of strings" ) else : raise SCons . Errors . InternalError ( "variant must be a string or a list of strings" ) else : raise SCons . Errors . InternalError ( "variant must be specified" ) for s in _DSPGenerator . srcargs : if s in env : if SCons . Util . is_String ( env [ s ] ) : source = source + ' "%s' % env [ s ] elif SCons . Util . is_List ( env [ s ] ) : for t in env [ s ] : if SCons . Util . is_String ( t ) : source = source + ' "%s"' % t else : raise SCons . Errors . InternalError ( s + " must be a string or a list of strings" ) else : raise SCons . Errors . InternalError ( s + " must be a string or a list of strings" ) source = source + ' "%s"' % str ( target [ 0 ] ) source = [ SCons . Node . Python . Value ( source ) ] targetlist = [ target [ 0 ] ] sourcelist = source if env . get ( 'auto_build_solution' , 1 ) : env [ 'projects' ] = [ env . File ( t ) . srcnode ( ) for t in targetlist ] t , s = solutionEmitter ( target , target , env ) targetlist = targetlist + t # Beginning with Visual Studio 2010 for each project file (.vcxproj) we have additional file (.vcxproj.filters) version_num = 6.0 if 'MSVS_VERSION' in env : version_num , suite = msvs_parse_version ( env [ 'MSVS_VERSION' ] ) if version_num >= 10.0 : targetlist . append ( targetlist [ 0 ] + '.filters' ) return ( targetlist , sourcelist )