| 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" |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 "\n"; | 236 "\n"; |
| 237 Value RunActionForEach(Scope* scope, | 237 Value RunActionForEach(Scope* scope, |
| 238 const FunctionCallNode* function, | 238 const FunctionCallNode* function, |
| 239 const std::vector<Value>& args, | 239 const std::vector<Value>& args, |
| 240 BlockNode* block, | 240 BlockNode* block, |
| 241 Err* err) { | 241 Err* err) { |
| 242 return ExecuteGenericTarget(functions::kActionForEach, scope, function, args, | 242 return ExecuteGenericTarget(functions::kActionForEach, scope, function, args, |
| 243 block, err); | 243 block, err); |
| 244 } | 244 } |
| 245 | 245 |
| 246 // bundle_data ----------------------------------------------------------------- |
| 247 |
| 248 const char kBundleData[] = "bundle_data"; |
| 249 const char kBundleData_HelpShort[] = |
| 250 "bundle_data: Declare a target without output."; |
| 251 const char kBundleData_Help[] = |
| 252 "bundle_data: Declare a target without output.\n" |
| 253 "\n" |
| 254 " This target type allows to declare data that is required at runtime.\n" |
| 255 " It is used to inform \"create_bundle\" targets of the files to copy\n" |
| 256 " into generated bundle, see \"gn help create_bundle\" for help.\n"; |
| 257 |
| 258 Value RunBundleData(Scope* scope, |
| 259 const FunctionCallNode* function, |
| 260 const std::vector<Value>& args, |
| 261 BlockNode* block, |
| 262 Err* err) { |
| 263 return ExecuteGenericTarget(functions::kBundleData, scope, function, args, |
| 264 block, err); |
| 265 } |
| 266 |
| 246 // copy ------------------------------------------------------------------------ | 267 // copy ------------------------------------------------------------------------ |
| 247 | 268 |
| 248 const char kCopy[] = "copy"; | 269 const char kCopy[] = "copy"; |
| 249 const char kCopy_HelpShort[] = | 270 const char kCopy_HelpShort[] = |
| 250 "copy: Declare a target that copies files."; | 271 "copy: Declare a target that copies files."; |
| 251 const char kCopy_Help[] = | 272 const char kCopy_Help[] = |
| 252 "copy: Declare a target that copies files.\n" | 273 "copy: Declare a target that copies files.\n" |
| 253 "\n" | 274 "\n" |
| 254 "File name handling\n" | 275 "File name handling\n" |
| 255 "\n" | 276 "\n" |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 const Template* templ = scope->GetTemplate(target_type); | 578 const Template* templ = scope->GetTemplate(target_type); |
| 558 if (templ) | 579 if (templ) |
| 559 return templ->Invoke(scope, function, sub_args, block, err); | 580 return templ->Invoke(scope, function, sub_args, block, err); |
| 560 | 581 |
| 561 // Otherwise, assume the target is a built-in target type. | 582 // Otherwise, assume the target is a built-in target type. |
| 562 return ExecuteGenericTarget(target_type.c_str(), scope, function, sub_args, | 583 return ExecuteGenericTarget(target_type.c_str(), scope, function, sub_args, |
| 563 block, err); | 584 block, err); |
| 564 } | 585 } |
| 565 | 586 |
| 566 } // namespace functions | 587 } // namespace functions |
| OLD | NEW |