zhangjiacool / gyp

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

MSVS generator creates invalid rule output files path when using --generator-output #455

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. extract ruleTest.zip file
2. run test.bat
3. build ./Build/ruleTest.sln

What is the expected output? What do you see instead?

gyp files
            'sources': [
                'src/GeneratedFunc.txt',
            ],

            'rules': [
                {
                    'rule_name': 'generateFile',
                    'extension': 'txt',

                    'outputs': [
                        './Build/<(RULE_INPUT_ROOT).cpp',
                    ],

                    'action': ['echo void func(){} > <(RULE_INPUT_ROOT).cpp'],
                    'msvs_cygwin_shell': 0,
                    'msvs_quote_cmd': 0,
                    'process_outputs_as_sources': 1,
                },
            ],

command line
            gyp.exe ruleTest.gyp -f msvs -G msvs_version=2012 -D target_arch=ia32 --depth=./ --generator-output=./Build

execute result
            Warning: Missing input files:
            ./Build\..\..\..\Build\GeneratedFunc.cpp

generate file path
            ./Build\GeneratedFunc.cpp

What version of the product are you using? On what operating system?
SVN revision 1973 on Windows 7 x64.

Please provide any additional information below.

changing pylib/gyp/generator/msvn.py 

L506
raw_outputs = _FixPaths(rule.get('outputs', []))
to
raw_outputs = rule.get('outputs', [])

L834
outputs = OrderedSet(_FixPaths(outputs))
to
outputs = OrderedSet(outputs)

will be fix this issue.

Original issue reported on code.google.com by hanagasi...@gmail.com on 6 Sep 2014 at 2:27

Attachments: