pvjohnson / gyp

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

VS2010: Actions using $(OutDir) as a param result in command-lines which don't parse correctly. #272

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
$(OutDir) is defined with a trailing backslash, which starts an escape 
sequence. The logged command-line (in the Visual Studio output) is:

  call "action" "../..\build\Debug\"

The parameter delivered to action is

  ../..\build\Debug"

If there are subsequent params, as in ...

  call "action" "../..\build\Debug\" "other"

The parameter delivered to action is

  ../..\build\Debug" other

What steps will reproduce the problem?
1. Create an action with $(OutDir) as a param
2. Have the tool output it's parameters when it's run.

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

I expect to see the parameter delivered to the application properly escaped.

  ../build\build\Debug\

Actually, I wouldn't expect the trailing slash to be there in the variable 
original definition. This requires all consumers to properly understand that 
they'll need to normalize the double slash out of references like.

  $(OutDir)\foo.dll

What version of the product are you using? On what operating system?

Windows 7
VS2010
GYP r1386 and r1392

Please provide any additional information below.

I haven't noticed this behavious with VS2008.

Original issue reported on code.google.com by rog...@chromium.org on 23 May 2012 at 2:46

GoogleCodeExporter commented 9 years ago
An additional note...

The problem is specifically the use of a a parameter that ends with a trailing 
slash. Most often when you use $(OutDir) you're specifying some file so there 
are additional unescaped characters following the slash and you don't run into 
this issue.

Original comment by rog...@chromium.org on 23 May 2012 at 2:53