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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <sstream> | 9 #include <sstream> |
10 | 10 |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 | 330 |
331 if (target->output_type() == Target::ACTION) { | 331 if (target->output_type() == Target::ACTION) { |
332 // Action, print out outputs, don't apply sources to it. | 332 // Action, print out outputs, don't apply sources to it. |
333 for (const auto& elem : target->action_values().outputs().list()) { | 333 for (const auto& elem : target->action_values().outputs().list()) { |
334 OutputString(" " + elem.AsString() + "\n"); | 334 OutputString(" " + elem.AsString() + "\n"); |
335 } | 335 } |
336 } else if (target->output_type() == Target::CREATE_BUNDLE) { | 336 } else if (target->output_type() == Target::CREATE_BUNDLE) { |
337 std::vector<SourceFile> output_files; | 337 std::vector<SourceFile> output_files; |
338 target->bundle_data().GetOutputsAsSourceFiles(target->settings(), | 338 target->bundle_data().GetOutputsAsSourceFiles(target->settings(), |
339 &output_files); | 339 &output_files); |
340 PrintFileList(output_files, "", true, false); | 340 PrintFileList(output_files, std::string(), true, false); |
341 } else { | 341 } else { |
342 const SubstitutionList& outputs = target->action_values().outputs(); | 342 const SubstitutionList& outputs = target->action_values().outputs(); |
343 if (!outputs.required_types().empty()) { | 343 if (!outputs.required_types().empty()) { |
344 // Display the pattern and resolved pattern separately, since there are | 344 // Display the pattern and resolved pattern separately, since there are |
345 // subtitutions used. | 345 // subtitutions used. |
346 OutputString(" Output pattern\n"); | 346 OutputString(" Output pattern\n"); |
347 for (const auto& elem : outputs.list()) | 347 for (const auto& elem : outputs.list()) |
348 OutputString(" " + elem.AsString() + "\n"); | 348 OutputString(" " + elem.AsString() + "\n"); |
349 | 349 |
350 // Now display what that resolves to given the sources. | 350 // Now display what that resolves to given the sources. |
351 OutputString("\n Resolved output file list\n"); | 351 OutputString("\n Resolved output file list\n"); |
352 } | 352 } |
353 | 353 |
354 // Resolved output list. | 354 // Resolved output list. |
355 std::vector<SourceFile> output_files; | 355 std::vector<SourceFile> output_files; |
356 SubstitutionWriter::ApplyListToSources(target->settings(), outputs, | 356 SubstitutionWriter::ApplyListToSources(target->settings(), outputs, |
357 target->sources(), &output_files); | 357 target->sources(), &output_files); |
358 PrintFileList(output_files, "", true, false); | 358 PrintFileList(output_files, std::string(), true, false); |
359 } | 359 } |
360 } | 360 } |
361 | 361 |
362 void PrintScript(const Target* target, bool display_header) { | 362 void PrintScript(const Target* target, bool display_header) { |
363 if (display_header) | 363 if (display_header) |
364 OutputString("\nscript\n"); | 364 OutputString("\nscript\n"); |
365 OutputString(" " + target->action_values().script().value() + "\n"); | 365 OutputString(" " + target->action_values().script().value() + "\n"); |
366 } | 366 } |
367 | 367 |
368 void PrintArgs(const Target* target, bool display_header) { | 368 void PrintArgs(const Target* target, bool display_header) { |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
924 printed_output = true; | 924 printed_output = true; |
925 | 925 |
926 if (!PrintConfig(config, what_to_print, display_item_header)) | 926 if (!PrintConfig(config, what_to_print, display_item_header)) |
927 return 1; | 927 return 1; |
928 } | 928 } |
929 | 929 |
930 return 0; | 930 return 0; |
931 } | 931 } |
932 | 932 |
933 } // namespace commands | 933 } // namespace commands |
OLD | NEW |