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 <algorithm> | 5 #include <algorithm> |
6 #include <set> | 6 #include <set> |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "tools/gn/commands.h" | 10 #include "tools/gn/commands.h" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 // Display the pattern. | 269 // Display the pattern. |
270 OutputString(" Output pattern:\n"); | 270 OutputString(" Output pattern:\n"); |
271 PrintFileList(target->action_values().outputs(), "", true, false); | 271 PrintFileList(target->action_values().outputs(), "", true, false); |
272 | 272 |
273 // Now display what that resolves to given the sources. | 273 // Now display what that resolves to given the sources. |
274 OutputString("\n Resolved output file list:\n"); | 274 OutputString("\n Resolved output file list:\n"); |
275 | 275 |
276 std::vector<std::string> output_strings; | 276 std::vector<std::string> output_strings; |
277 FileTemplate file_template = FileTemplate::GetForTargetOutputs(target); | 277 FileTemplate file_template = FileTemplate::GetForTargetOutputs(target); |
278 for (size_t i = 0; i < target->sources().size(); i++) | 278 for (size_t i = 0; i < target->sources().size(); i++) |
279 file_template.ApplyString(target->sources()[i].value(), &output_strings); | 279 file_template.Apply(target->sources()[i], &output_strings); |
280 | 280 |
281 std::sort(output_strings.begin(), output_strings.end()); | 281 std::sort(output_strings.begin(), output_strings.end()); |
282 for (size_t i = 0; i < output_strings.size(); i++) { | 282 for (size_t i = 0; i < output_strings.size(); i++) { |
283 OutputString(" " + output_strings[i] + "\n"); | 283 OutputString(" " + output_strings[i] + "\n"); |
284 } | 284 } |
285 } | 285 } |
286 } | 286 } |
287 | 287 |
288 void PrintScript(const Target* target, bool display_header) { | 288 void PrintScript(const Target* target, bool display_header) { |
289 if (display_header) | 289 if (display_header) |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 // so always display them, even for groups and such. | 593 // so always display them, even for groups and such. |
594 PrintLibs(target, true); | 594 PrintLibs(target, true); |
595 PrintLibDirs(target, true); | 595 PrintLibDirs(target, true); |
596 | 596 |
597 PrintDeps(target, true); | 597 PrintDeps(target, true); |
598 | 598 |
599 return 0; | 599 return 0; |
600 } | 600 } |
601 | 601 |
602 } // namespace commands | 602 } // namespace commands |
OLD | NEW |