| 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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 " one (either directly or all of them).\n" | 517 " one (either directly or all of them).\n" |
| 518 "\n" | 518 "\n" |
| 519 " script\n" | 519 " script\n" |
| 520 " args\n" | 520 " args\n" |
| 521 " depfile\n" | 521 " depfile\n" |
| 522 " Actions only. The script and related values.\n" | 522 " Actions only. The script and related values.\n" |
| 523 "\n" | 523 "\n" |
| 524 " outputs\n" | 524 " outputs\n" |
| 525 " Outputs for script and copy target types.\n" | 525 " Outputs for script and copy target types.\n" |
| 526 "\n" | 526 "\n" |
| 527 " arflags [--blame]\n" |
| 527 " defines [--blame]\n" | 528 " defines [--blame]\n" |
| 528 " include_dirs [--blame]\n" | 529 " include_dirs [--blame]\n" |
| 529 " cflags [--blame]\n" | 530 " cflags [--blame]\n" |
| 530 " cflags_cc [--blame]\n" | 531 " cflags_cc [--blame]\n" |
| 531 " cflags_cxx [--blame]\n" | 532 " cflags_cxx [--blame]\n" |
| 532 " ldflags [--blame]\n" | 533 " ldflags [--blame]\n" |
| 533 " lib_dirs\n" | 534 " lib_dirs\n" |
| 534 " libs\n" | 535 " libs\n" |
| 535 " Shows the given values taken from the target and all configs\n" | 536 " Shows the given values taken from the target and all configs\n" |
| 536 " applying. See \"--blame\" below.\n" | 537 " applying. See \"--blame\" below.\n" |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 } else if (what == variables::kOutputs) { | 656 } else if (what == variables::kOutputs) { |
| 656 PrintOutputs(target, false); | 657 PrintOutputs(target, false); |
| 657 } else if (what == variables::kDeps) { | 658 } else if (what == variables::kDeps) { |
| 658 PrintDeps(target, false); | 659 PrintDeps(target, false); |
| 659 } else if (what == variables::kLibDirs) { | 660 } else if (what == variables::kLibDirs) { |
| 660 PrintLibDirs(target, false); | 661 PrintLibDirs(target, false); |
| 661 } else if (what == variables::kLibs) { | 662 } else if (what == variables::kLibs) { |
| 662 PrintLibs(target, false); | 663 PrintLibs(target, false); |
| 663 } else if (what == "runtime_deps") { | 664 } else if (what == "runtime_deps") { |
| 664 PrintRuntimeDeps(target); | 665 PrintRuntimeDeps(target); |
| 666 // } Hidden closing brace in macro below. |
| 665 | 667 |
| 666 CONFIG_VALUE_HANDLER(defines, std::string) | 668 CONFIG_VALUE_HANDLER(defines, std::string) |
| 667 CONFIG_VALUE_HANDLER(include_dirs, SourceDir) | 669 CONFIG_VALUE_HANDLER(include_dirs, SourceDir) |
| 670 CONFIG_VALUE_HANDLER(arflags, std::string) |
| 668 CONFIG_VALUE_HANDLER(asmflags, std::string) | 671 CONFIG_VALUE_HANDLER(asmflags, std::string) |
| 669 CONFIG_VALUE_HANDLER(cflags, std::string) | 672 CONFIG_VALUE_HANDLER(cflags, std::string) |
| 670 CONFIG_VALUE_HANDLER(cflags_c, std::string) | 673 CONFIG_VALUE_HANDLER(cflags_c, std::string) |
| 671 CONFIG_VALUE_HANDLER(cflags_cc, std::string) | 674 CONFIG_VALUE_HANDLER(cflags_cc, std::string) |
| 672 CONFIG_VALUE_HANDLER(cflags_objc, std::string) | 675 CONFIG_VALUE_HANDLER(cflags_objc, std::string) |
| 673 CONFIG_VALUE_HANDLER(cflags_objcc, std::string) | 676 CONFIG_VALUE_HANDLER(cflags_objcc, std::string) |
| 674 CONFIG_VALUE_HANDLER(ldflags, std::string) | 677 CONFIG_VALUE_HANDLER(ldflags, std::string) |
| 675 | 678 |
| 676 } else { | 679 } else { |
| 677 OutputString("Don't know how to display \"" + what + "\".\n"); | 680 OutputString("Don't know how to display \"" + what + "\".\n"); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 | 729 |
| 727 if (is_binary_output) { | 730 if (is_binary_output) { |
| 728 OUTPUT_CONFIG_VALUE(defines, std::string) | 731 OUTPUT_CONFIG_VALUE(defines, std::string) |
| 729 OUTPUT_CONFIG_VALUE(include_dirs, SourceDir) | 732 OUTPUT_CONFIG_VALUE(include_dirs, SourceDir) |
| 730 OUTPUT_CONFIG_VALUE(asmflags, std::string) | 733 OUTPUT_CONFIG_VALUE(asmflags, std::string) |
| 731 OUTPUT_CONFIG_VALUE(cflags, std::string) | 734 OUTPUT_CONFIG_VALUE(cflags, std::string) |
| 732 OUTPUT_CONFIG_VALUE(cflags_c, std::string) | 735 OUTPUT_CONFIG_VALUE(cflags_c, std::string) |
| 733 OUTPUT_CONFIG_VALUE(cflags_cc, std::string) | 736 OUTPUT_CONFIG_VALUE(cflags_cc, std::string) |
| 734 OUTPUT_CONFIG_VALUE(cflags_objc, std::string) | 737 OUTPUT_CONFIG_VALUE(cflags_objc, std::string) |
| 735 OUTPUT_CONFIG_VALUE(cflags_objcc, std::string) | 738 OUTPUT_CONFIG_VALUE(cflags_objcc, std::string) |
| 736 OUTPUT_CONFIG_VALUE(ldflags, std::string) | 739 |
| 740 if (target->output_type() == Target::STATIC_LIBRARY) |
| 741 OUTPUT_CONFIG_VALUE(arflags, std::string) |
| 742 else if (target->output_type() != Target::SOURCE_SET) |
| 743 OUTPUT_CONFIG_VALUE(ldflags, std::string) |
| 737 } | 744 } |
| 738 | 745 |
| 739 if (target->output_type() == Target::ACTION || | 746 if (target->output_type() == Target::ACTION || |
| 740 target->output_type() == Target::ACTION_FOREACH) { | 747 target->output_type() == Target::ACTION_FOREACH) { |
| 741 PrintScript(target, true); | 748 PrintScript(target, true); |
| 742 PrintArgs(target, true); | 749 PrintArgs(target, true); |
| 743 PrintDepfile(target, true); | 750 PrintDepfile(target, true); |
| 744 } | 751 } |
| 745 | 752 |
| 746 if (target->output_type() == Target::ACTION || | 753 if (target->output_type() == Target::ACTION || |
| 747 target->output_type() == Target::ACTION_FOREACH || | 754 target->output_type() == Target::ACTION_FOREACH || |
| 748 target->output_type() == Target::COPY_FILES || | 755 target->output_type() == Target::COPY_FILES || |
| 749 target->output_type() == Target::CREATE_BUNDLE) { | 756 target->output_type() == Target::CREATE_BUNDLE) { |
| 750 PrintOutputs(target, true); | 757 PrintOutputs(target, true); |
| 751 } | 758 } |
| 752 | 759 |
| 753 // Libs can be part of any target and get recursively pushed up the chain, | 760 // Libs can be part of any target and get recursively pushed up the chain, |
| 754 // so always display them, even for groups and such. | 761 // so always display them, even for groups and such. |
| 755 PrintLibs(target, true); | 762 PrintLibs(target, true); |
| 756 PrintLibDirs(target, true); | 763 PrintLibDirs(target, true); |
| 757 | 764 |
| 758 PrintDeps(target, true); | 765 PrintDeps(target, true); |
| 759 | 766 |
| 760 return 0; | 767 return 0; |
| 761 } | 768 } |
| 762 | 769 |
| 763 } // namespace commands | 770 } // namespace commands |
| OLD | NEW |