| 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/variables.h" | 5 #include "tools/gn/variables.h" |
| 6 | 6 |
| 7 namespace variables { | 7 namespace variables { |
| 8 | 8 |
| 9 // Built-in variables ---------------------------------------------------------- | 9 // Built-in variables ---------------------------------------------------------- |
| 10 | 10 |
| (...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 "\n" | 771 "\n" |
| 772 " If visibility is defined, only the targets with labels that match it\n" | 772 " If visibility is defined, only the targets with labels that match it\n" |
| 773 " can depend on the current target. The empty list means no targets\n" | 773 " can depend on the current target. The empty list means no targets\n" |
| 774 " can depend on the current target.\n" | 774 " can depend on the current target.\n" |
| 775 "\n" | 775 "\n" |
| 776 " Tip: Often you will want the same visibility for all targets in a\n" | 776 " Tip: Often you will want the same visibility for all targets in a\n" |
| 777 " BUILD file. In this case you can just put the definition at the top,\n" | 777 " BUILD file. In this case you can just put the definition at the top,\n" |
| 778 " outside of any target, and the targets will inherit that scope and see\n" | 778 " outside of any target, and the targets will inherit that scope and see\n" |
| 779 " the definition.\n" | 779 " the definition.\n" |
| 780 "\n" | 780 "\n" |
| 781 "Matching:\n" | 781 "Patterns\n" |
| 782 "\n" | 782 "\n" |
| 783 " You can specify \"*\" but the inputs aren't general patterns. The\n" | 783 " See \"gn help label_pattern\" for more details on what types of\n" |
| 784 " following classes of patterns are supported:\n" | 784 " patterns are supported. If a toolchain is specified, only targets\n" |
| 785 " in that toolchain will be matched. If a toolchain is not specified on\n" |
| 786 " a pattern, targets in all toolchains will be matched.\n" |
| 785 "\n" | 787 "\n" |
| 786 " - Explicit (no wildcard):\n" | 788 "Examples\n" |
| 787 " \"//foo/bar:baz\"\n" | |
| 788 " \":baz\"\n" | |
| 789 " - Wildcard target names:\n" | |
| 790 " \"//foo/bar:*\" (any target in the //foo/bar/BUILD.gn file)\n" | |
| 791 " \":*\" (any target in the current build file)\n" | |
| 792 " - Wildcard directory names (\"*\" is only supported at the end)\n" | |
| 793 " \"*\" (any target anywhere)\n" | |
| 794 " \"//foo/bar/*\" (any target in any subdir of //foo/bar)\n" | |
| 795 " \"./*\" (any target in the current build file or sub dirs)\n" | |
| 796 "\n" | |
| 797 " The toolchain (normally an implicit part of a label) is ignored when\n" | |
| 798 " checking visibility.\n" | |
| 799 "\n" | |
| 800 "Examples:\n" | |
| 801 "\n" | 789 "\n" |
| 802 " Only targets in the current buildfile (\"private\", the default):\n" | 790 " Only targets in the current buildfile (\"private\", the default):\n" |
| 803 " visibility = \":*\"\n" | 791 " visibility = \":*\"\n" |
| 804 "\n" | 792 "\n" |
| 805 " No targets (used for targets that should be leaf nodes):\n" | 793 " No targets (used for targets that should be leaf nodes):\n" |
| 806 " visibility = []\n" | 794 " visibility = []\n" |
| 807 "\n" | 795 "\n" |
| 808 " Any target (\"public\"):\n" | 796 " Any target (\"public\"):\n" |
| 809 " visibility = \"*\"\n" | 797 " visibility = \"*\"\n" |
| 810 "\n" | 798 "\n" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 INSERT_VARIABLE(Script) | 877 INSERT_VARIABLE(Script) |
| 890 INSERT_VARIABLE(Sources) | 878 INSERT_VARIABLE(Sources) |
| 891 INSERT_VARIABLE(Visibility) | 879 INSERT_VARIABLE(Visibility) |
| 892 } | 880 } |
| 893 return info_map; | 881 return info_map; |
| 894 } | 882 } |
| 895 | 883 |
| 896 #undef INSERT_VARIABLE | 884 #undef INSERT_VARIABLE |
| 897 | 885 |
| 898 } // namespace variables | 886 } // namespace variables |
| OLD | NEW |