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

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

Issue 10274018: ninja windows: more support for VS macros (Closed) Base URL: https://gyp.googlecode.com/svn/trunk
Patch Set: guard convertvsmacros on win Created 8 years, 8 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/msvs_emulation.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/generator/ninja.py
diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py
index 3662e491b440e4b3d288ec1acd161afb2c8a18ce..575493b6b90b1a7b489bfe04690a98db8a102749 100644
--- a/pylib/gyp/generator/ninja.py
+++ b/pylib/gyp/generator/ninja.py
@@ -495,7 +495,10 @@ class NinjaWriter:
name)
is_cygwin = (self.msvs_settings.IsRuleRunUnderCygwin(action)
if self.flavor == 'win' else False)
- rule_name = self.WriteNewNinjaRule(name, action['action'], description,
+ args = action['action']
+ args = [self.msvs_settings.ConvertVSMacros(arg, self.base_to_build)
+ for arg in args] if self.flavor == 'win' else args
+ rule_name = self.WriteNewNinjaRule(name, args, description,
is_cygwin, env=env)
inputs = [self.GypPathToNinja(i, env) for i in action['inputs']]
@@ -527,6 +530,8 @@ class NinjaWriter:
('%s ' + generator_default_variables['RULE_INPUT_PATH']) % name)
is_cygwin = (self.msvs_settings.IsRuleRunUnderCygwin(rule)
if self.flavor == 'win' else False)
+ args = [self.msvs_settings.ConvertVSMacros(arg, self.base_to_build)
+ for arg in args] if self.flavor == 'win' else args
rule_name = self.WriteNewNinjaRule(name, args, description, is_cygwin)
# TODO: if the command references the outputs directly, we should
@@ -1074,6 +1079,9 @@ class NinjaWriter:
args = args[:]
+ if self.flavor == 'win':
+ description = self.msvs_settings.ConvertVSMacros(description)
+
# gyp dictates that commands are run from the base directory.
# cd into the directory before running, and adjust paths in
# the arguments to point to the proper locations.
@@ -1087,8 +1095,6 @@ class NinjaWriter:
args = [self.ExpandSpecial(arg, self.base_to_build) for arg in args]
env = self.ComputeExportEnvString(env) if self.flavor != 'win' else ''
if self.flavor == 'win':
- args = [self.msvs_settings.ConvertVSMacros(a, self.base_to_build)
- for a in args]
if is_cygwin:
command = self.msvs_settings.BuildCygwinBashCommandLine(
args, self.build_to_base)
« no previous file with comments | « no previous file | pylib/gyp/msvs_emulation.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698