suriab / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

xcode: copy a single source to multiple destinations #160

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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/Co
ntents/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.

Original issue reported on code.google.com by tkent@chromium.org on 21 Jul 2010 at 8:02

GoogleCodeExporter commented 9 years ago
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?

Original comment by tony@chromium.org on 5 Aug 2010 at 12:14

GoogleCodeExporter commented 9 years ago
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.

Original comment by stuartmorgan@chromium.org on 5 Aug 2010 at 6:02