evanlabs / gyp

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

Make: for 'copies' rules, normpath breaks make variables followed by a '..' #255

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The Make backend uses os.path.normpath() to strip trailing slashes - this was 
introduced in http://codereview.chromium.org/8645001

The problem is when the path includes a make variable followed by '..' - the 
call to normpath will collapse the make variable. e.g.

$(builddir)/../foo

becomes
foo

when it should be unchanged.

What steps will reproduce the problem?
See attached test case

I have a proposed fix in addition to the test case, please see attached patch.

Original issue reported on code.google.com by b...@google.com on 29 Feb 2012 at 7:48

GoogleCodeExporter commented 9 years ago

Original comment by b...@google.com on 29 Feb 2012 at 7:59

Attachments:

GoogleCodeExporter commented 9 years ago
This is a much needed change.  It should make clank.gyp 500 lines shorter and 
95% more readable :)

Ben, are you on this?  Or I'm happy to take over if you don't have the time 
right now.

Original comment by newt@chromium.org on 22 Aug 2012 at 12:09

GoogleCodeExporter commented 9 years ago
Please feel free to take this :)

Thanks!

Original comment by b...@google.com on 22 Aug 2012 at 9:30

GoogleCodeExporter commented 9 years ago
Alright, I'm on it.  http://codereview.chromium.org/10868036/

Original comment by newt@chromium.org on 23 Aug 2012 at 5:57