Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1394)

Unified Diff: pylib/gyp/generator/make.py

Issue 10535052: Make Ninja backend robust to rules and actions containing slashes (Closed) Base URL: http://git.chromium.org/external/gyp.git@master
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pylib/gyp/generator/ninja.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/generator/make.py
===================================================================
--- pylib/gyp/generator/make.py (revision 1410)
+++ pylib/gyp/generator/make.py (working copy)
@@ -602,8 +602,7 @@
def StringToMakefileVariable(string):
"""Convert a string to a value that is acceptable as a make variable name."""
- # TODO: replace other metacharacters that we encounter.
- return re.sub('[ {}$]', '_', string)
+ return re.sub('[^a-zA-Z0-9_]', '_', string)
srcdir_prefix = ''
« no previous file with comments | « no previous file | pylib/gyp/generator/ninja.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698