OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "tools/gn/ninja_target_writer.h" | 5 #include "tools/gn/ninja_target_writer.h" |
6 | 6 |
7 #include <fstream> | 7 #include <fstream> |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 // Extra hard deps passed in. | 161 // Extra hard deps passed in. |
162 for (size_t i = 0; i < extra_hard_deps.size(); i++) { | 162 for (size_t i = 0; i < extra_hard_deps.size(); i++) { |
163 out_ << " "; | 163 out_ << " "; |
164 path_output_.WriteFile(out_, | 164 path_output_.WriteFile(out_, |
165 helper_.GetTargetOutputFile(extra_hard_deps[i])); | 165 helper_.GetTargetOutputFile(extra_hard_deps[i])); |
166 } | 166 } |
167 | 167 |
168 out_ << "\n"; | 168 out_ << "\n"; |
169 return " | " + stamp_file_string; | 169 return " | " + stamp_file_string; |
170 } | 170 } |
171 | |
172 FileTemplate NinjaTargetWriter::GetOutputTemplate() const { | |
173 const Target::FileList& outputs = target_->action_values().outputs(); | |
174 std::vector<std::string> output_template_args; | |
175 for (size_t i = 0; i < outputs.size(); i++) { | |
176 // All outputs should be in the output dir. | |
177 output_template_args.push_back( | |
178 RemovePrefix(outputs[i].value(), | |
179 settings_->build_settings()->build_dir().value())); | |
180 } | |
181 return FileTemplate(target_->settings(), output_template_args); | |
182 } | |
OLD | NEW |