Monorail Project: gyp Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 160 xcode: copy a single source to multiple destinations
Starred by 5 users Reported by tkent@chromium.org, Jul 21 2010 Back to list
Status: New
Owner: ----



Sign in to add a comment
What steps will reproduce the problem?
1. Write the following rule
2. run gyp on Mac OS X 10.5.8

 'copies': [
    {
      'destination': '<(PRODUCT_DIR)/TestShell.app/Contents/PlugIns/',
      'files': ['<(PRODUCT_DIR)/TestNetscapePlugIn.plugin/'],
    },
    {
      'destination': '<(PRODUCT_DIR)/DumpRenderTree.app/Contents/PlugIns/',
      'files': ['<(PRODUCT_DIR)/TestNetscapePlugIn.plugin/'],
    },
  ],


What is the expected output? What do you see instead?
I had:
Updating projects from gyp files...
Traceback (most recent call last):
  File "src/build/gyp_chromium", line 97, in <module>
    sys.exit(gyp.main(args))
  File "src/tools/gyp/pylib/gyp/__init__.py", line 454, in main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "src/tools/gyp/pylib/gyp/generator/xcode.py", line 1054, in GenerateOutput
    pbxcp.AddFile(file)
  File "src/tools/gyp/pylib/gyp/xcodeproj_file.py", line 1789, in AddFile
    file_ref = file_group.AddOrGetFileByPath(path, hierarchical)
  File "src/tools/gyp/pylib/gyp/xcodeproj_file.py", line 1263, in AddOrGetFileByPath
    hierarchical)
  File "src/tools/gyp/pylib/gyp/xcodeproj_file.py", line 1230, in AddOrGetFileByPath
    self.AppendChild(file_ref)
  File "src/tools/gyp/pylib/gyp/xcodeproj_file.py", line 1119, in AppendChild
    self._AddChildToDicts(child)
  File "src/tools/gyp/pylib/gyp/xcodeproj_file.py", line 1102, in _AddChildToDicts
    raise ValueError, 'Found multiple children with path ' + child_path
ValueError: Found multiple children with path TestNetscapePlugIn.plugin
failed to run command:
/System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python src/build/gyp_chromium


What version of the product are you using? On what operating system?
gyp r837 in Chromium TOT.

Please provide any additional information below.


 
Project Member Comment 1 by tony@chromium.org, Aug 5 2010
Ugh, I just hit this as well.  On mac, I want to copy the layout test plugin into a third location.  Is this fixable in xcode or should I work around the problem?
Project Member Comment 2 by stuartmorgan@chromium.org, Aug 5 2010
What we actually need to do for this particular case is switch everything that needs this plugin to run with the plugin directory flag pointing to <(PRODUCT_DIR)/plugins/, and only copy it to there; bugs are filed for that, but there are a few places we need to nail down still.
Sign in to add a comment