| 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 <iostream> | 7 #include <iostream> |
| 8 | 8 |
| 9 #include "base/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 " set of flags, defines, etc. for a target is generated in this order:\n" | 254 " set of flags, defines, etc. for a target is generated in this order:\n" |
| 255 "\n" | 255 "\n" |
| 256 " 1. The values specified directly on the target (rather than using a\n" | 256 " 1. The values specified directly on the target (rather than using a\n" |
| 257 " config.\n" | 257 " config.\n" |
| 258 " 2. The configs specified in the target's \"configs\" list, in order.\n" | 258 " 2. The configs specified in the target's \"configs\" list, in order.\n" |
| 259 " 3. Public_configs from a breadth-first traversal of the dependency\n" | 259 " 3. Public_configs from a breadth-first traversal of the dependency\n" |
| 260 " tree in the order that the targets appear in \"deps\".\n" | 260 " tree in the order that the targets appear in \"deps\".\n" |
| 261 " 4. All dependent configs from a breadth-first traversal of the\n" | 261 " 4. All dependent configs from a breadth-first traversal of the\n" |
| 262 " dependency tree in the order that the targets appear in \"deps\".\n" | 262 " dependency tree in the order that the targets appear in \"deps\".\n" |
| 263 "\n" | 263 "\n" |
| 264 "Variables valid in a config definition:\n" | 264 "Variables valid in a config definition\n" |
| 265 "\n" |
| 265 CONFIG_VALUES_VARS_HELP | 266 CONFIG_VALUES_VARS_HELP |
| 267 " Nested configs: configs\n" |
| 266 "\n" | 268 "\n" |
| 267 "Variables on a target used to apply configs:\n" | 269 "Variables on a target used to apply configs\n" |
| 270 "\n" |
| 268 " all_dependent_configs, configs, public_configs\n" | 271 " all_dependent_configs, configs, public_configs\n" |
| 269 "\n" | 272 "\n" |
| 270 "Example:\n" | 273 "Example\n" |
| 274 "\n" |
| 271 " config(\"myconfig\") {\n" | 275 " config(\"myconfig\") {\n" |
| 272 " includes = [ \"include/common\" ]\n" | 276 " includes = [ \"include/common\" ]\n" |
| 273 " defines = [ \"ENABLE_DOOM_MELON\" ]\n" | 277 " defines = [ \"ENABLE_DOOM_MELON\" ]\n" |
| 274 " }\n" | 278 " }\n" |
| 275 "\n" | 279 "\n" |
| 276 " executable(\"mything\") {\n" | 280 " executable(\"mything\") {\n" |
| 277 " configs = [ \":myconfig\" ]\n" | 281 " configs = [ \":myconfig\" ]\n" |
| 278 " }\n"; | 282 " }\n"; |
| 279 | 283 |
| 280 Value RunConfig(const FunctionCallNode* function, | 284 Value RunConfig(const FunctionCallNode* function, |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 } | 917 } |
| 914 | 918 |
| 915 // Otherwise it's a no-block function. | 919 // Otherwise it's a no-block function. |
| 916 if (!VerifyNoBlockForFunctionCall(function, block, err)) | 920 if (!VerifyNoBlockForFunctionCall(function, block, err)) |
| 917 return Value(); | 921 return Value(); |
| 918 return found_function->second.no_block_runner(scope, function, | 922 return found_function->second.no_block_runner(scope, function, |
| 919 args.list_value(), err); | 923 args.list_value(), err); |
| 920 } | 924 } |
| 921 | 925 |
| 922 } // namespace functions | 926 } // namespace functions |
| OLD | NEW |