rick147 / gyp

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

Variable expansion does not work for the sources! exclusion list #369

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In a common gypi, I have the following:
'includes': [
    'path.gypi',
], # includes

In path.gypi, I have the following:
{
    'ltpath': '../../../../lt/code/project/common',
}

In a static library, I have the following direct dependent settings:
'direct_dependent_settings': {
    'sources': [
        '<@(_ltpath)/../../source/Bootstrap/<@(OS)/main.mm',
    ],  # sources

In an executable (with specific requirements), I have the following section 
under "target":
'sources!': [
    '<@(_ltpath)/../../source/Bootstrap/<@(OS)/main.mm',
],

The result is incorrect; the "main.mm" file is not excluded from the executable.

However, remove the ltpath variable:

static library:
'direct_dependent_settings': {
    'sources': [
        '../../source/Bootstrap/<@(OS)/main.mm',
    ],  # sources

In an executable (with specific requirements), I have the following section 
under "target":
'sources!': [
    '../../source/Bootstrap/<@(OS)/main.mm',
],

And the result is correct; "main.mm" is excluded from the executable.

Therefore it appears variable expansion does not work correctly for the 
"sources!" exclusion list.

Original issue reported on code.google.com by terencej...@gmail.com on 18 Sep 2013 at 8:53