wangyu5 / gyp

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

Mac make uses shared directory for INTERMEDIATE_DIR #233

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Build both make and xcode versions of the following "my.gyp" file:
# File: my.gyp
{
  'targets': [
    {
      'target_name': 'main',
      'type': 'executable',
      'dependencies': ['code_gen'],
      'sources': [
        '<(INTERMEDIATE_DIR)/program.c',
      ],
    },
    {
      'target_name': 'code_gen',
      'type': 'none',
      'actions': [{
        'inputs': [ 'main.c' ],
        'outputs': [ '<(INTERMEDIATE_DIR)/program.c' ],
        'action_name': 'create_program_c',
        'action': [ 'cp', 'main.c', '<(INTERMEDIATE_DIR)/program.c' ],
      }],
    },
  ],
}

2. $ find out -name program.c
out/Default/obj.target/geni/program.c

3. $ find build  -name program.c
build/my.build/DerivedSources/Default/program.c

What is the expected output?
  I would expect that if I rename the gyp file to be "new.gyp" the make build would not collide INTERMEDIATE_DIR location.

What do you see instead?
  The xcode version uses "build/new.build/..." and "build/my.build/..." which properly isolates intermediate directories.  The make version uses "out/Default/obj.target/..." for both new.gyp and my.gyp.

Original issue reported on code.google.com by dhollowa@chromium.org on 7 Nov 2011 at 9:08

GoogleCodeExporter commented 9 years ago
Thanks!

I'll move this over to the cr tracker, since codesite doesn't support 
cross-project querying, and all the other bugs are over there.

Original comment by thakis@chromium.org on 7 Nov 2011 at 9:16