| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef TOOLS_GN_SUBSTITUTION_TYPE_H_ | 5 #ifndef TOOLS_GN_SUBSTITUTION_TYPE_H_ |
| 6 #define TOOLS_GN_SUBSTITUTION_TYPE_H_ | 6 #define TOOLS_GN_SUBSTITUTION_TYPE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 class Err; | 10 class Err; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 SUBSTITUTION_LDFLAGS, // {{ldflags}} | 57 SUBSTITUTION_LDFLAGS, // {{ldflags}} |
| 58 SUBSTITUTION_LIBS, // {{libs}} | 58 SUBSTITUTION_LIBS, // {{libs}} |
| 59 SUBSTITUTION_OUTPUT_EXTENSION, // {{output_extension}} | 59 SUBSTITUTION_OUTPUT_EXTENSION, // {{output_extension}} |
| 60 SUBSTITUTION_SOLIBS, // {{solibs}} | 60 SUBSTITUTION_SOLIBS, // {{solibs}} |
| 61 | 61 |
| 62 // Valid for bundle_data targets. | 62 // Valid for bundle_data targets. |
| 63 SUBSTITUTION_BUNDLE_ROOT_DIR, // {{bundle_root_dir}} | 63 SUBSTITUTION_BUNDLE_ROOT_DIR, // {{bundle_root_dir}} |
| 64 SUBSTITUTION_BUNDLE_RESOURCES_DIR, // {{bundle_resources_dir}} | 64 SUBSTITUTION_BUNDLE_RESOURCES_DIR, // {{bundle_resources_dir}} |
| 65 SUBSTITUTION_BUNDLE_EXECUTABLE_DIR, // {{bundle_executable_dir}} | 65 SUBSTITUTION_BUNDLE_EXECUTABLE_DIR, // {{bundle_executable_dir}} |
| 66 SUBSTITUTION_BUNDLE_PLUGINS_DIR, // {{bundle_plugins_dir}} | 66 SUBSTITUTION_BUNDLE_PLUGINS_DIR, // {{bundle_plugins_dir}} |
| 67 SUBSTITUTION_BUNDLE_BINARY_COMPRESS, // {{binary_compress}} |
| 67 | 68 |
| 68 // Used only for the args of actions. | 69 // Used only for the args of actions. |
| 69 SUBSTITUTION_RSP_FILE_NAME, // {{response_file_name}} | 70 SUBSTITUTION_RSP_FILE_NAME, // {{response_file_name}} |
| 70 | 71 |
| 71 SUBSTITUTION_NUM_TYPES // Must be last. | 72 SUBSTITUTION_NUM_TYPES // Must be last. |
| 72 }; | 73 }; |
| 73 | 74 |
| 74 // An array of size SUBSTITUTION_NUM_TYPES that lists the names of the | 75 // An array of size SUBSTITUTION_NUM_TYPES that lists the names of the |
| 75 // substitution patterns, including the curly braces. So, for example, | 76 // substitution patterns, including the curly braces. So, for example, |
| 76 // kSubstitutionNames[SUBSTITUTION_SOURCE] == "{{source}}". | 77 // kSubstitutionNames[SUBSTITUTION_SOURCE] == "{{source}}". |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // Returns true if the given substitution is valid for the named purpose. | 111 // Returns true if the given substitution is valid for the named purpose. |
| 111 bool IsValidBundleDataSubstitution(SubstitutionType type); | 112 bool IsValidBundleDataSubstitution(SubstitutionType type); |
| 112 bool IsValidSourceSubstitution(SubstitutionType type); | 113 bool IsValidSourceSubstitution(SubstitutionType type); |
| 113 // Both compiler and linker tools. | 114 // Both compiler and linker tools. |
| 114 bool IsValidToolSubstitution(SubstitutionType type); | 115 bool IsValidToolSubstitution(SubstitutionType type); |
| 115 bool IsValidCompilerSubstitution(SubstitutionType type); | 116 bool IsValidCompilerSubstitution(SubstitutionType type); |
| 116 bool IsValidCompilerOutputsSubstitution(SubstitutionType type); | 117 bool IsValidCompilerOutputsSubstitution(SubstitutionType type); |
| 117 bool IsValidLinkerSubstitution(SubstitutionType type); | 118 bool IsValidLinkerSubstitution(SubstitutionType type); |
| 118 bool IsValidLinkerOutputsSubstitution(SubstitutionType type); | 119 bool IsValidLinkerOutputsSubstitution(SubstitutionType type); |
| 119 bool IsValidCopySubstitution(SubstitutionType type); | 120 bool IsValidCopySubstitution(SubstitutionType type); |
| 121 bool IsValidCopyBundleDataSubstitution(SubstitutionType type); |
| 120 bool IsValidCompileXCassetsSubstitution(SubstitutionType type); | 122 bool IsValidCompileXCassetsSubstitution(SubstitutionType type); |
| 121 | 123 |
| 122 // Like the "IsValid..." version above but checks a list of types and sets a | 124 // Like the "IsValid..." version above but checks a list of types and sets a |
| 123 // an error blaming the given source if the test fails. | 125 // an error blaming the given source if the test fails. |
| 124 bool EnsureValidSourcesSubstitutions( | 126 bool EnsureValidSourcesSubstitutions( |
| 125 const std::vector<SubstitutionType>& types, | 127 const std::vector<SubstitutionType>& types, |
| 126 const ParseNode* origin, | 128 const ParseNode* origin, |
| 127 Err* err); | 129 Err* err); |
| 128 | 130 |
| 129 #endif // TOOLS_GN_SUBSTITUTION_TYPE_H_ | 131 #endif // TOOLS_GN_SUBSTITUTION_TYPE_H_ |
| OLD | NEW |