ambuild2/frontend/amb2/gen.py
changeset 190 ac8f25935d84
parent 188 f8be44aa769a
child 192 b651ea8825bb
     1.1 --- a/ambuild2/frontend/amb2/gen.py	Fri Nov 15 20:15:05 2013 -0800
     1.2 +++ b/ambuild2/frontend/amb2/gen.py	Fri Nov 15 22:20:02 2013 -0800
     1.3 @@ -211,13 +211,9 @@
     1.4          # We let the same folder be generated twice, so use discard, not remove.
     1.5          self.old_folders_.discard(entry)
     1.6        else:
     1.7 -        util.con_err(
     1.8 -          util.ConsoleRed,
     1.9 -          'Folder has the same node signature as: ',
    1.10 -          util.ConsoleBlue,
    1.11 -          entry.format(),
    1.12 -          util.ConsoleNormal
    1.13 -        )
    1.14 +        util.con_err(util.ConsoleRed, 'Folder has the same node signature as: ',
    1.15 +                     util.ConsoleBlue, entry.format(),
    1.16 +                     util.ConsoleNormal)
    1.17          raise Exception('Output has been duplicated: {0}'.format(entry.path))
    1.18  
    1.19        parent = entry
    1.20 @@ -481,7 +477,7 @@
    1.21      self.parseCxxDeps(cx, binary, inputs, binary.compiler.linkflags)
    1.22      self.parseCxxDeps(cx, binary, inputs, binary.compiler.postlink)
    1.23  
    1.24 -    for objfile in binary.objfiles:
    1.25 +    for objfile in binary.objects:
    1.26        cxxData = {
    1.27          'argv': objfile.argv,
    1.28          'type': binary.linker.behavior
    1.29 @@ -496,6 +492,21 @@
    1.30          data = cxxData
    1.31        )
    1.32        inputs.append(cxxNode)
    1.33 +    for rcfile in binary.resources:
    1.34 +      rcData = {
    1.35 +        'cl_argv': rcfile.cl_argv,
    1.36 +        'rc_argv': rcfile.rc_argv,
    1.37 +      }
    1.38 +      rcCmd, (rcNode,) = self.addCommand(
    1.39 +        context = cx,
    1.40 +        weak_inputs = binary.compiler.sourcedeps,
    1.41 +        inputs = [rcfile.sourceFile],
    1.42 +        outputs = [rcfile.outputFile],
    1.43 +        node_type = nodetypes.Rc,
    1.44 +        folder = folder_node,
    1.45 +        data = rcData
    1.46 +      )
    1.47 +      inputs.append(rcNode)
    1.48  
    1.49      outputs = [binary.outputFile]
    1.50      if binary.pdbFile: