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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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"; | 681 const char kPublic[] = "public"; |
682 const char kPublic_HelpShort[] = | 682 const char kPublic_HelpShort[] = |
683 "public: [file list] Declare public header files for a target."; | 683 "public: [file list] Declare public header files for a target."; |
684 const char kPublic_Help[] = | 684 const char kPublic_Help[] = |
685 "public: Declare public header files for a target.\n" | 685 "public: Declare public header files for a target.\n" |
686 "\n" | 686 "\n" |
687 " A list of files and patterns that other targets can include. These\n" | 687 " A list of files that other targets can include. These permissions are\n" |
688 " permissions are checked via the \"check\" command\n" | 688 " checked via the \"check\" command (see \"gn help check\").\n" |
689 " (see \"gn help check\").\n" | |
690 "\n" | 689 "\n" |
691 " If no public files are declared, other targets (assuming they have\n" | 690 " 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" | 691 " visibility to depend on this target can include any file in the\n" |
693 " variable is defined on a target, dependent targets may only include\n" | 692 " sources list. If this variable is defined on a target, dependent\n" |
694 " files on this whitelist.\n" | 693 " targets may only include 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" | 694 "\n" |
700 " Header file permissions are also subject to visibility. A target\n" | 695 " 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" | 696 " 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" | 697 " and the public headers indicate which subset of those files are\n" |
703 " permitted.\n" | 698 " permitted. See \"gn help visibility\" for more.\n" |
704 "\n" | 699 "\n" |
705 " Public files are inherited through the dependency tree. So if there is\n" | 700 " 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" | 701 " 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" | 702 " 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" | 703 " visibility list, the include will be rejected.\n" |
709 "\n" | 704 "\n" |
| 705 " GN only knows about files declared in the \"sources\" and \"public\"\n" |
| 706 " sections of targets. If a file is included that is now known to the\n" |
| 707 " build, it will be allowed.\n" |
| 708 "\n" |
710 "Examples:\n" | 709 "Examples:\n" |
711 " These exact files are public:\n" | 710 " These exact files are public:\n" |
712 " public = [ \"foo.h\", \"bar.h\" ]\n" | 711 " public = [ \"foo.h\", \"bar.h\" ]\n" |
713 "\n" | 712 "\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" | 713 " No files are public (no targets may include headers from this one):\n" |
718 " public = []\n"; | 714 " public = []\n"; |
719 | 715 |
720 const char kScript[] = "script"; | 716 const char kScript[] = "script"; |
721 const char kScript_HelpShort[] = | 717 const char kScript_HelpShort[] = |
722 "script: [file name] Script file for actions."; | 718 "script: [file name] Script file for actions."; |
723 const char kScript_Help[] = | 719 const char kScript_Help[] = |
724 "script: Script file for actions.\n" | 720 "script: Script file for actions.\n" |
725 "\n" | 721 "\n" |
726 " An absolute or buildfile-relative file name of a Python script to run\n" | 722 " An absolute or buildfile-relative file name of a Python script to run\n" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 INSERT_VARIABLE(SourcePrereqs) | 910 INSERT_VARIABLE(SourcePrereqs) |
915 INSERT_VARIABLE(Sources) | 911 INSERT_VARIABLE(Sources) |
916 INSERT_VARIABLE(Visibility) | 912 INSERT_VARIABLE(Visibility) |
917 } | 913 } |
918 return info_map; | 914 return info_map; |
919 } | 915 } |
920 | 916 |
921 #undef INSERT_VARIABLE | 917 #undef INSERT_VARIABLE |
922 | 918 |
923 } // namespace variables | 919 } // namespace variables |
OLD | NEW |