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

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

Issue 347193005: Makes analyzer strip off a leading path separator (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: add special case for windows Created 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/generator/analyzer.py
diff --git a/pylib/gyp/generator/analyzer.py b/pylib/gyp/generator/analyzer.py
index 007d17d17e183f470664b1d3f1fcf1fce13b9ced..77e46472a6bca3e45a5949ada4eb564a4faface0 100644
--- a/pylib/gyp/generator/analyzer.py
+++ b/pylib/gyp/generator/analyzer.py
@@ -40,6 +40,8 @@ def __MakeRelativeTargetName(path):
prune_path = os.getcwd()
if path.startswith(prune_path):
path = path[len(prune_path):]
+ if len(path) and path.startswith(os.sep):
+ path = path[len(os.sep):]
# Gyp paths are always posix style.
path = path.replace('\\', '/')
if path.endswith('#target'):
@@ -166,6 +168,15 @@ def CalculateVariables(default_variables, params):
default_variables.setdefault('OS', 'mac')
elif flavor == 'win':
default_variables.setdefault('OS', 'win')
+ # Copy additional generator configuration data from VS, which is shared
+ # by the Windows Ninja generator.
+ import gyp.generator.msvs as msvs_generator
+ generator_additional_non_configuration_keys = getattr(msvs_generator,
+ 'generator_additional_non_configuration_keys', [])
+ generator_additional_path_sections = getattr(msvs_generator,
+ 'generator_additional_path_sections', [])
+
+ gyp.msvs_emulation.CalculateCommonVariables(default_variables, params)
else:
operating_system = flavor
if flavor == 'android':
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698