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/functions.h" | 5 #include "tools/gn/functions.h" |
6 | 6 |
7 #include "tools/gn/config_values_generator.h" | 7 #include "tools/gn/config_values_generator.h" |
8 #include "tools/gn/err.h" | 8 #include "tools/gn/err.h" |
9 #include "tools/gn/parse_tree.h" | 9 #include "tools/gn/parse_tree.h" |
10 #include "tools/gn/scope.h" | 10 #include "tools/gn/scope.h" |
11 #include "tools/gn/target_generator.h" | 11 #include "tools/gn/target_generator.h" |
12 #include "tools/gn/value.h" | 12 #include "tools/gn/value.h" |
13 #include "tools/gn/variables.h" | 13 #include "tools/gn/variables.h" |
14 | 14 |
15 #define DEPENDENT_CONFIG_VARS \ | 15 #define DEPENDENT_CONFIG_VARS \ |
16 " Dependent configs: all_dependent_configs, direct_dependent_configs\n" | 16 " Dependent configs: all_dependent_configs, direct_dependent_configs\n" |
17 #define DEPS_VARS \ | 17 #define DEPS_VARS \ |
18 " Deps: data, datadeps, deps, forward_dependent_configs_from, hard_dep\n" | 18 " Deps: data, datadeps, deps, forward_dependent_configs_from, hard_dep\n" |
19 #define GENERAL_TARGET_VARS \ | 19 #define GENERAL_TARGET_VARS \ |
20 " General: configs, external, source_prereqs, sources\n" | 20 " General: configs, source_prereqs, sources\n" |
21 | 21 |
22 namespace functions { | 22 namespace functions { |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 Value ExecuteGenericTarget(const char* target_type, | 26 Value ExecuteGenericTarget(const char* target_type, |
27 Scope* scope, | 27 Scope* scope, |
28 const FunctionCallNode* function, | 28 const FunctionCallNode* function, |
29 const std::vector<Value>& args, | 29 const std::vector<Value>& args, |
30 BlockNode* block, | 30 BlockNode* block, |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 "\n" | 343 "\n" |
344 " Depending on a group is exactly like depending directly on that\n" | 344 " Depending on a group is exactly like depending directly on that\n" |
345 " group's deps. Direct dependent configs will get automatically\n" | 345 " group's deps. Direct dependent configs will get automatically\n" |
346 " forwarded through the group so you shouldn't need to use\n" | 346 " forwarded through the group so you shouldn't need to use\n" |
347 " \"forward_dependent_configs_from.\n" | 347 " \"forward_dependent_configs_from.\n" |
348 "\n" | 348 "\n" |
349 "Variables\n" | 349 "Variables\n" |
350 "\n" | 350 "\n" |
351 DEPS_VARS | 351 DEPS_VARS |
352 DEPENDENT_CONFIG_VARS | 352 DEPENDENT_CONFIG_VARS |
353 " Other variables: external\n" | |
354 "\n" | 353 "\n" |
355 "Example\n" | 354 "Example\n" |
356 "\n" | 355 "\n" |
357 " group(\"all\") {\n" | 356 " group(\"all\") {\n" |
358 " deps = [\n" | 357 " deps = [\n" |
359 " \"//project:runner\",\n" | 358 " \"//project:runner\",\n" |
360 " \"//project:unit_tests\",\n" | 359 " \"//project:unit_tests\",\n" |
361 " ]\n" | 360 " ]\n" |
362 " }\n"; | 361 " }\n"; |
363 | 362 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 Value RunTest(Scope* scope, | 485 Value RunTest(Scope* scope, |
487 const FunctionCallNode* function, | 486 const FunctionCallNode* function, |
488 const std::vector<Value>& args, | 487 const std::vector<Value>& args, |
489 BlockNode* block, | 488 BlockNode* block, |
490 Err* err) { | 489 Err* err) { |
491 return ExecuteGenericTarget(functions::kExecutable, scope, function, args, | 490 return ExecuteGenericTarget(functions::kExecutable, scope, function, args, |
492 block, err); | 491 block, err); |
493 } | 492 } |
494 | 493 |
495 } // namespace functions | 494 } // namespace functions |
OLD | NEW |