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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 "\n" | 671 "\n" |
672 " Outputs is valid for \"copy\", \"action\", and \"action_foreach\"\n" | 672 " Outputs is valid for \"copy\", \"action\", and \"action_foreach\"\n" |
673 " target types and indicates the resulting files. The values may contain\n" | 673 " target types and indicates the resulting files. The values may contain\n" |
674 " source expansions to generate the output names from the sources (see\n" | 674 " source expansions to generate the output names from the sources (see\n" |
675 " \"gn help source_expansion\").\n" | 675 " \"gn help source_expansion\").\n" |
676 "\n" | 676 "\n" |
677 " For copy targets, the outputs is the destination for the copied\n" | 677 " For copy targets, the outputs is the destination for the copied\n" |
678 " file(s). For actions, the outputs should be the list of files\n" | 678 " file(s). For actions, the outputs should be the list of files\n" |
679 " generated by the script.\n"; | 679 " generated by the script.\n"; |
680 | 680 |
| 681 const char kPublic[] = "public"; |
| 682 const char kPublic_HelpShort[] = |
| 683 "public: [file list] Declare public header files for a target."; |
| 684 const char kPublic_Help[] = |
| 685 "public: Declare public header files for a target.\n" |
| 686 "\n" |
| 687 " A list of files and patterns that other targets can include. These\n" |
| 688 " permissions are checked via the \"check\" command\n" |
| 689 " (see \"gn help check\").\n" |
| 690 "\n" |
| 691 " If no public files are declared, other targets (assuming they have\n" |
| 692 " visibility to depend on this target) can include any file. If this\n" |
| 693 " variable is defined on a target, dependent targets may only include\n" |
| 694 " files on this whitelist.\n" |
| 695 "\n" |
| 696 " The entries in this list are patterns (see \"gn help patterns\") so\n" |
| 697 " you can use simple wildcard matching if you have a directory of public\n" |
| 698 " files.\n" |
| 699 "\n" |
| 700 " Header file permissions are also subject to visibility. A target\n" |
| 701 " must be visible to another target to include any files from it at all\n" |
| 702 " and the public headers indicate which subset of those files are\n" |
| 703 " permitted.\n" |
| 704 "\n" |
| 705 " Public files are inherited through the dependency tree. So if there is\n" |
| 706 " a dependency A -> B -> C, then A can include C's public headers.\n" |
| 707 " However, the same is NOT true of visibility, so unless A is in C's\n" |
| 708 " visibility list, the include will be rejected.\n" |
| 709 "\n" |
| 710 "Examples:\n" |
| 711 " These exact files are public:\n" |
| 712 " public = [ \"foo.h\", \"bar.h\" ]\n" |
| 713 "\n" |
| 714 " All files in the \"public\" directory are public:\n" |
| 715 " public = [ \"public/*\" ]\n" |
| 716 "\n" |
| 717 " No files are public (no targets may include headers from this one):\n" |
| 718 " public = []\n"; |
| 719 |
681 const char kScript[] = "script"; | 720 const char kScript[] = "script"; |
682 const char kScript_HelpShort[] = | 721 const char kScript_HelpShort[] = |
683 "script: [file name] Script file for actions."; | 722 "script: [file name] Script file for actions."; |
684 const char kScript_Help[] = | 723 const char kScript_Help[] = |
685 "script: Script file for actions.\n" | 724 "script: Script file for actions.\n" |
686 "\n" | 725 "\n" |
687 " An absolute or buildfile-relative file name of a Python script to run\n" | 726 " An absolute or buildfile-relative file name of a Python script to run\n" |
688 " for a action and action_foreach targets (see \"gn help action\" and\n" | 727 " for a action and action_foreach targets (see \"gn help action\" and\n" |
689 " \"gn help action_foreach\").\n"; | 728 " \"gn help action_foreach\").\n"; |
690 | 729 |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 INSERT_VARIABLE(DirectDependentConfigs) | 902 INSERT_VARIABLE(DirectDependentConfigs) |
864 INSERT_VARIABLE(ForwardDependentConfigsFrom) | 903 INSERT_VARIABLE(ForwardDependentConfigsFrom) |
865 INSERT_VARIABLE(HardDep) | 904 INSERT_VARIABLE(HardDep) |
866 INSERT_VARIABLE(IncludeDirs) | 905 INSERT_VARIABLE(IncludeDirs) |
867 INSERT_VARIABLE(Ldflags) | 906 INSERT_VARIABLE(Ldflags) |
868 INSERT_VARIABLE(Libs) | 907 INSERT_VARIABLE(Libs) |
869 INSERT_VARIABLE(LibDirs) | 908 INSERT_VARIABLE(LibDirs) |
870 INSERT_VARIABLE(OutputExtension) | 909 INSERT_VARIABLE(OutputExtension) |
871 INSERT_VARIABLE(OutputName) | 910 INSERT_VARIABLE(OutputName) |
872 INSERT_VARIABLE(Outputs) | 911 INSERT_VARIABLE(Outputs) |
| 912 INSERT_VARIABLE(Public) |
873 INSERT_VARIABLE(Script) | 913 INSERT_VARIABLE(Script) |
874 INSERT_VARIABLE(SourcePrereqs) | 914 INSERT_VARIABLE(SourcePrereqs) |
875 INSERT_VARIABLE(Sources) | 915 INSERT_VARIABLE(Sources) |
876 INSERT_VARIABLE(Visibility) | 916 INSERT_VARIABLE(Visibility) |
877 } | 917 } |
878 return info_map; | 918 return info_map; |
879 } | 919 } |
880 | 920 |
881 #undef INSERT_VARIABLE | 921 #undef INSERT_VARIABLE |
882 | 922 |
883 } // namespace variables | 923 } // namespace variables |
OLD | NEW |