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 12 matching lines...) Expand all Loading... |
23 SUBSTITUTION_SOURCE = SUBSTITUTION_FIRST_PATTERN, // {{source}} | 23 SUBSTITUTION_SOURCE = SUBSTITUTION_FIRST_PATTERN, // {{source}} |
24 SUBSTITUTION_OUTPUT, // {{output}} | 24 SUBSTITUTION_OUTPUT, // {{output}} |
25 | 25 |
26 // Valid for all compiler tools. | 26 // Valid for all compiler tools. |
27 SUBSTITUTION_SOURCE_NAME_PART, // {{source_name_part}} | 27 SUBSTITUTION_SOURCE_NAME_PART, // {{source_name_part}} |
28 SUBSTITUTION_SOURCE_FILE_PART, // {{source_file_part}} | 28 SUBSTITUTION_SOURCE_FILE_PART, // {{source_file_part}} |
29 SUBSTITUTION_SOURCE_DIR, // {{source_dir}} | 29 SUBSTITUTION_SOURCE_DIR, // {{source_dir}} |
30 SUBSTITUTION_SOURCE_ROOT_RELATIVE_DIR, // {{root_relative_dir}} | 30 SUBSTITUTION_SOURCE_ROOT_RELATIVE_DIR, // {{root_relative_dir}} |
31 SUBSTITUTION_SOURCE_GEN_DIR, // {{source_gen_dir}} | 31 SUBSTITUTION_SOURCE_GEN_DIR, // {{source_gen_dir}} |
32 SUBSTITUTION_SOURCE_OUT_DIR, // {{source_out_dir}} | 32 SUBSTITUTION_SOURCE_OUT_DIR, // {{source_out_dir}} |
| 33 SUBSTITUTION_SOURCE_TARGET_RELATIVE, // {{source_target_relative}} |
33 | 34 |
34 // Valid for all compiler and linker tools. These depend on the target and | 35 // Valid for all compiler and linker tools. These depend on the target and |
35 // do not vary on a per-file basis. | 36 // do not vary on a per-file basis. |
36 SUBSTITUTION_LABEL, // {{label}} | 37 SUBSTITUTION_LABEL, // {{label}} |
37 SUBSTITUTION_LABEL_NAME, // {{label_name}} | 38 SUBSTITUTION_LABEL_NAME, // {{label_name}} |
38 SUBSTITUTION_ROOT_GEN_DIR, // {{root_gen_dir}} | 39 SUBSTITUTION_ROOT_GEN_DIR, // {{root_gen_dir}} |
39 SUBSTITUTION_ROOT_OUT_DIR, // {{root_out_dir}} | 40 SUBSTITUTION_ROOT_OUT_DIR, // {{root_out_dir}} |
40 SUBSTITUTION_TARGET_GEN_DIR, // {{target_gen_dir}} | 41 SUBSTITUTION_TARGET_GEN_DIR, // {{target_gen_dir}} |
41 SUBSTITUTION_TARGET_OUT_DIR, // {{target_out_dir}} | 42 SUBSTITUTION_TARGET_OUT_DIR, // {{target_out_dir}} |
42 SUBSTITUTION_TARGET_OUTPUT_NAME, // {{target_output_name}} | 43 SUBSTITUTION_TARGET_OUTPUT_NAME, // {{target_output_name}} |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 bool IsValidCompileXCassetsSubstitution(SubstitutionType type); | 129 bool IsValidCompileXCassetsSubstitution(SubstitutionType type); |
129 | 130 |
130 // Like the "IsValid..." version above but checks a list of types and sets a | 131 // Like the "IsValid..." version above but checks a list of types and sets a |
131 // an error blaming the given source if the test fails. | 132 // an error blaming the given source if the test fails. |
132 bool EnsureValidSourcesSubstitutions( | 133 bool EnsureValidSourcesSubstitutions( |
133 const std::vector<SubstitutionType>& types, | 134 const std::vector<SubstitutionType>& types, |
134 const ParseNode* origin, | 135 const ParseNode* origin, |
135 Err* err); | 136 Err* err); |
136 | 137 |
137 #endif // TOOLS_GN_SUBSTITUTION_TYPE_H_ | 138 #endif // TOOLS_GN_SUBSTITUTION_TYPE_H_ |
OLD | NEW |