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

Unified Diff: tools/gn/ninja_script_target_writer.cc

Issue 30253002: Use paths relative to build dir in custom actions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
Index: tools/gn/ninja_script_target_writer.cc
diff --git a/tools/gn/ninja_script_target_writer.cc b/tools/gn/ninja_script_target_writer.cc
index 4678ba05f43ea039f43686455c45fd6a1b7ec560..e5af560d74fdfbe04fbedecf0974ce9bf6665324 100644
--- a/tools/gn/ninja_script_target_writer.cc
+++ b/tools/gn/ninja_script_target_writer.cc
@@ -92,10 +92,7 @@ std::string NinjaScriptTargetWriter::WriteRuleDefinition(
} else {
// Posix can execute Python directly.
out_ << "rule " << custom_rule_name << std::endl;
- out_ << " command = cd ";
- path_output_.WriteDir(out_, target_->label().dir(),
- PathOutput::DIR_NO_LAST_SLASH);
- out_ << "; $pythonpath ";
+ out_ << " command = $pythonpath ";
brettw 2013/10/23 16:27:05 While you're here, can you do WriteFile(...python_
koz (OOO until 15th September) 2013/10/24 05:56:28 Done.
path_output_.WriteFile(out_, target_->script_values().script());
args_template.WriteWithNinjaExpansions(out_);
out_ << std::endl;
@@ -133,7 +130,7 @@ void NinjaScriptTargetWriter::WriteSourceRules(
out_ << "build";
WriteOutputFilesForBuildLine(output_template, sources[i], output_files);
- out_ << ": " << custom_rule_name;
+ out_ << ": " << custom_rule_name << " ";
brettw 2013/10/23 16:27:05 Whoopsies! I guess I haven't done any script stuff
koz (OOO until 15th September) 2013/10/24 05:56:28 I wondered for a bit if it was some bit of ninja s
path_output_.WriteFile(out_, sources[i]);
out_ << implicit_deps << std::endl;
« no previous file with comments | « no previous file | tools/gn/ninja_script_target_writer_unittest.cc » ('j') | tools/gn/ninja_script_target_writer_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698