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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 " * = required\n" | 272 " * = required\n" |
273 "\n" | 273 "\n" |
274 "Examples\n" | 274 "Examples\n" |
275 "\n" | 275 "\n" |
276 " bundle_data(\"icudata\") {\n" | 276 " bundle_data(\"icudata\") {\n" |
277 " sources = [ \"sources/data/in/icudtl.dat\" ]\n" | 277 " sources = [ \"sources/data/in/icudtl.dat\" ]\n" |
278 " outputs = [ \"{{bundle_resources_dir}}/{{source_file_part}}\" ]\n" | 278 " outputs = [ \"{{bundle_resources_dir}}/{{source_file_part}}\" ]\n" |
279 " }\n" | 279 " }\n" |
280 "\n" | 280 "\n" |
281 " bundle_data(\"base_unittests_bundle_data]\") {\n" | 281 " bundle_data(\"base_unittests_bundle_data]\") {\n" |
282 " sources = [ \"test/data\" ]\n" | 282 " sources = [ \"test/data\" ]\n" |
283 " outputs = [\n" | 283 " outputs = [\n" |
284 " \"{{bundle_resources_dir}}/{{source_root_relative_dir}}/\" +\n" | 284 " \"{{bundle_resources_dir}}/{{source_root_relative_dir}}/\" +\n" |
285 " \"{{source_file_part}}\"\n" | 285 " \"{{source_file_part}}\"\n" |
286 " ]\n" | 286 " ]\n" |
287 " }\n" | 287 " }\n" |
288 "\n" | 288 "\n" |
289 " bundle_data(\"material_typography_bundle_data\") {\n" | 289 " bundle_data(\"material_typography_bundle_data\") {\n" |
290 " sources = [\n" | 290 " sources = [\n" |
291 " \"src/MaterialTypography.bundle/Roboto-Bold.ttf\",\n" | 291 " \"src/MaterialTypography.bundle/Roboto-Bold.ttf\",\n" |
292 " \"src/MaterialTypography.bundle/Roboto-Italic.ttf\",\n" | 292 " \"src/MaterialTypography.bundle/Roboto-Italic.ttf\",\n" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 "\n" | 346 "\n" |
347 " If code_signing_script is defined, then code_signing_outputs must also\n" | 347 " If code_signing_script is defined, then code_signing_outputs must also\n" |
348 " be defined and non-empty to inform when the script needs to be re-run.\n" | 348 " be defined and non-empty to inform when the script needs to be re-run.\n" |
349 " The code_signing_args will be passed as is to the script (so path have\n" | 349 " The code_signing_args will be passed as is to the script (so path have\n" |
350 " to be rebased) and additional inputs may be listed with the variable\n" | 350 " to be rebased) and additional inputs may be listed with the variable\n" |
351 " code_signing_sources.\n" | 351 " code_signing_sources.\n" |
352 "\n" | 352 "\n" |
353 "Variables\n" | 353 "Variables\n" |
354 "\n" | 354 "\n" |
355 " bundle_root_dir*, bundle_resources_dir*, bundle_executable_dir*,\n" | 355 " bundle_root_dir*, bundle_resources_dir*, bundle_executable_dir*,\n" |
356 " bundle_plugins_dir*, deps, data_deps, public_deps, visibility,\n" | 356 " bundle_plugins_dir*, bundle_deps_filter, deps, data_deps, public_deps,\n" |
357 " product_type, code_signing_args, code_signing_script,\n" | 357 " visibility, product_type, code_signing_args, code_signing_script,\n" |
358 " code_signing_sources, code_signing_outputs\n" | 358 " code_signing_sources, code_signing_outputs\n" |
359 " * = required\n" | 359 " * = required\n" |
360 "\n" | 360 "\n" |
361 "Example\n" | 361 "Example\n" |
362 "\n" | 362 "\n" |
363 " # Defines a template to create an application. On most platform, this\n" | 363 " # Defines a template to create an application. On most platform, this\n" |
364 " # is just an alias for an \"executable\" target, but on iOS/OS X, it\n" | 364 " # is just an alias for an \"executable\" target, but on iOS/OS X, it\n" |
365 " # builds an application bundle.\n" | 365 " # builds an application bundle.\n" |
366 " template(\"app\") {\n" | 366 " template(\"app\") {\n" |
367 " if (!is_ios && !is_mac) {\n" | 367 " if (!is_ios && !is_mac) {\n" |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 const Template* templ = scope->GetTemplate(target_type); | 774 const Template* templ = scope->GetTemplate(target_type); |
775 if (templ) | 775 if (templ) |
776 return templ->Invoke(scope, function, target_type, sub_args, block, err); | 776 return templ->Invoke(scope, function, target_type, sub_args, block, err); |
777 | 777 |
778 // Otherwise, assume the target is a built-in target type. | 778 // Otherwise, assume the target is a built-in target type. |
779 return ExecuteGenericTarget(target_type.c_str(), scope, function, sub_args, | 779 return ExecuteGenericTarget(target_type.c_str(), scope, function, sub_args, |
780 block, err); | 780 block, err); |
781 } | 781 } |
782 | 782 |
783 } // namespace functions | 783 } // namespace functions |
OLD | NEW |