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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 " rebase_path() (see \"gn help rebase_path\") to convert it\n" | 176 " rebase_path() (see \"gn help rebase_path\") to convert it\n" |
177 " to be relative to the build directory.\n" | 177 " to be relative to the build directory.\n" |
178 "\n" | 178 "\n" |
179 " See also \"target_out_dir\" which is usually a better location for\n" | 179 " See also \"target_out_dir\" which is usually a better location for\n" |
180 " output files. It will be inside the root output dir.\n" | 180 " output files. It will be inside the root output dir.\n" |
181 "\n" | 181 "\n" |
182 "Example:\n" | 182 "Example:\n" |
183 "\n" | 183 "\n" |
184 " custom(\"myscript\") {\n" | 184 " custom(\"myscript\") {\n" |
185 " # Pass the output dir to the script.\n" | 185 " # Pass the output dir to the script.\n" |
186 " args = [ \"-o\", rebase_path(root_out_dir, \".\", root_build_dir) ]\n" | 186 " args = [ \"-o\", rebase_path(root_out_dir, root_build_dir) ]\n" |
187 " }\n"; | 187 " }\n"; |
188 | 188 |
189 const char kTargetGenDir[] = "target_gen_dir"; | 189 const char kTargetGenDir[] = "target_gen_dir"; |
190 const char kTargetGenDir_HelpShort[] = | 190 const char kTargetGenDir_HelpShort[] = |
191 "target_gen_dir: [string] Directory for a target's generated files."; | 191 "target_gen_dir: [string] Directory for a target's generated files."; |
192 const char kTargetGenDir_Help[] = | 192 const char kTargetGenDir_Help[] = |
193 "target_gen_dir: Directory for a target's generated files.\n" | 193 "target_gen_dir: Directory for a target's generated files.\n" |
194 "\n" | 194 "\n" |
195 " Absolute path to the target's generated file directory. If your\n" | 195 " Absolute path to the target's generated file directory. If your\n" |
196 " current target is in \"//tools/doom_melon\" then this value might be\n" | 196 " current target is in \"//tools/doom_melon\" then this value might be\n" |
197 " \"//out/Debug/gen/tools/doom_melon\". It will not have a trailing\n" | 197 " \"//out/Debug/gen/tools/doom_melon\". It will not have a trailing\n" |
198 " slash.\n" | 198 " slash.\n" |
199 "\n" | 199 "\n" |
200 " This is primarily useful for setting up include paths for generated\n" | 200 " This is primarily useful for setting up include paths for generated\n" |
201 " files. If you are passing this to a script, you will want to pass it\n" | 201 " files. If you are passing this to a script, you will want to pass it\n" |
202 " through rebase_path() (see \"gn help rebase_path\") to convert it\n" | 202 " through rebase_path() (see \"gn help rebase_path\") to convert it\n" |
203 " to be relative to the build directory.\n" | 203 " to be relative to the build directory.\n" |
204 "\n" | 204 "\n" |
205 " See also \"gn help root_gen_dir\".\n" | 205 " See also \"gn help root_gen_dir\".\n" |
206 "\n" | 206 "\n" |
207 "Example:\n" | 207 "Example:\n" |
208 "\n" | 208 "\n" |
209 " custom(\"myscript\") {\n" | 209 " custom(\"myscript\") {\n" |
210 " # Pass the generated output dir to the script.\n" | 210 " # Pass the generated output dir to the script.\n" |
211 " args = [ \"-o\", rebase_path(target_gen_dir, \".\", root_build_dir) ]" | 211 " args = [ \"-o\", rebase_path(target_gen_dir, root_build_dir) ]" |
212 "\n" | 212 "\n" |
213 " }\n"; | 213 " }\n"; |
214 | 214 |
215 const char kTargetOutDir[] = "target_out_dir"; | 215 const char kTargetOutDir[] = "target_out_dir"; |
216 const char kTargetOutDir_HelpShort[] = | 216 const char kTargetOutDir_HelpShort[] = |
217 "target_out_dir: [string] Directory for target output files."; | 217 "target_out_dir: [string] Directory for target output files."; |
218 const char kTargetOutDir_Help[] = | 218 const char kTargetOutDir_Help[] = |
219 "target_out_dir: [string] Directory for target output files." | 219 "target_out_dir: [string] Directory for target output files." |
220 "\n" | 220 "\n" |
221 " Absolute path to the target's generated file directory. If your\n" | 221 " Absolute path to the target's generated file directory. If your\n" |
222 " current target is in \"//tools/doom_melon\" then this value might be\n" | 222 " current target is in \"//tools/doom_melon\" then this value might be\n" |
223 " \"//out/Debug/obj/tools/doom_melon\". It will not have a trailing\n" | 223 " \"//out/Debug/obj/tools/doom_melon\". It will not have a trailing\n" |
224 " slash.\n" | 224 " slash.\n" |
225 "\n" | 225 "\n" |
226 " This is primarily useful for setting up arguments for calling\n" | 226 " This is primarily useful for setting up arguments for calling\n" |
227 " scripts. If you are passing this to a script, you will want to pass it\n" | 227 " scripts. If you are passing this to a script, you will want to pass it\n" |
228 " through rebase_path() (see \"gn help rebase_path\") to convert it\n" | 228 " through rebase_path() (see \"gn help rebase_path\") to convert it\n" |
229 " to be relative to the build directory.\n" | 229 " to be relative to the build directory.\n" |
230 "\n" | 230 "\n" |
231 " See also \"gn help root_out_dir\".\n" | 231 " See also \"gn help root_out_dir\".\n" |
232 "\n" | 232 "\n" |
233 "Example:\n" | 233 "Example:\n" |
234 "\n" | 234 "\n" |
235 " custom(\"myscript\") {\n" | 235 " custom(\"myscript\") {\n" |
236 " # Pass the output dir to the script.\n" | 236 " # Pass the output dir to the script.\n" |
237 " args = [ \"-o\", rebase_path(target_out_dir, \".\", root_build_dir) ]" | 237 " args = [ \"-o\", rebase_path(target_out_dir, root_build_dir) ]" |
238 "\n" | 238 "\n" |
239 " }\n"; | 239 " }\n"; |
240 | 240 |
241 // Target variables ------------------------------------------------------------ | 241 // Target variables ------------------------------------------------------------ |
242 | 242 |
243 const char kAllDependentConfigs[] = "all_dependent_configs"; | 243 const char kAllDependentConfigs[] = "all_dependent_configs"; |
244 const char kAllDependentConfigs_HelpShort[] = | 244 const char kAllDependentConfigs_HelpShort[] = |
245 "all_dependent_configs: [label list] Configs to be forced on dependents."; | 245 "all_dependent_configs: [label list] Configs to be forced on dependents."; |
246 const char kAllDependentConfigs_Help[] = | 246 const char kAllDependentConfigs_Help[] = |
247 "all_dependent_configs: Configs to be forced on dependents.\n" | 247 "all_dependent_configs: Configs to be forced on dependents.\n" |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 INSERT_VARIABLE(Script) | 839 INSERT_VARIABLE(Script) |
840 INSERT_VARIABLE(SourcePrereqs) | 840 INSERT_VARIABLE(SourcePrereqs) |
841 INSERT_VARIABLE(Sources) | 841 INSERT_VARIABLE(Sources) |
842 } | 842 } |
843 return info_map; | 843 return info_map; |
844 } | 844 } |
845 | 845 |
846 #undef INSERT_VARIABLE | 846 #undef INSERT_VARIABLE |
847 | 847 |
848 } // namespace variables | 848 } // namespace variables |
OLD | NEW |