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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
427 "\n" | 427 "\n" |
428 " executable(\"doom_melon\") {\n" | 428 " executable(\"doom_melon\") {\n" |
429 " deps = [ \"//foo:bar\" ]\n" | 429 " deps = [ \"//foo:bar\" ]\n" |
430 " ...\n" | 430 " ...\n" |
431 " assert_no_deps = [\n" | 431 " assert_no_deps = [\n" |
432 " \"//evil/*\", # Don't link any code from the evil directory.\n" | 432 " \"//evil/*\", # Don't link any code from the evil directory.\n" |
433 " \"//foo:test_support\", # This target is also disallowed.\n" | 433 " \"//foo:test_support\", # This target is also disallowed.\n" |
434 " ]\n" | 434 " ]\n" |
435 " }\n"; | 435 " }\n"; |
436 | 436 |
437 const char kBundleRootDir[] = "bundle_root_dir"; | |
438 const char kBundleRootDir_HelpShort[] = | |
439 "bundle_root_dir: Expansion of {{bundle_root_dir}} in create_bundle."; | |
440 const char kBundleRootDir_Help[] = | |
441 "bundle_root_dir: Expansion of {{bundle_root_dir}} in create_bundle.\n" | |
442 "\n" | |
443 " A string corresponding to a path in $root_build_dir.\n" | |
brettw
2016/03/02 21:12:42
Don't use the $ here since the $ sign just does va
sdefresne
2016/03/07 20:47:35
Done.
| |
444 "\n" | |
445 " This string is used by the \"create_bundle\" target to expand the\n" | |
446 " {{bundle_root_dir}} of the \"bundle_data\" target it depends on.\n" | |
447 " This must correspond to a path under $root_build_dir.\n" | |
brettw
2016/03/02 21:12:42
No $ here and in cases below.
sdefresne
2016/03/07 20:47:35
Done.
| |
448 "\n" | |
449 "Example\n" | |
450 "\n" | |
451 " bundle_data(\"info_plist\") {\n" | |
452 " sources = [ \"Info.plist\" ]\n" | |
453 " outputs = [ \"{{bundle_root_dir}}/Info.plist\" ]\n" | |
454 " }\n" | |
455 "\n" | |
456 " create_bundle(\"doom_melon.app\") {\n" | |
457 " deps = [ \":info_plist\" ]\n" | |
458 " bundle_root_dir = \"$root_build_dir/doom_melon.app/Contents\"\n" | |
459 " bundle_resources_dir = bundle_root_dir + \"/Resources\"\n" | |
460 " bundle_executable_dir = bundle_root_dir + \"/MacOS\"\n" | |
461 " bundle_plugins_dir = bundle_root_dir + \"/PlugIns\"\n" | |
462 " }\n"; | |
463 | |
464 const char kBundleResourcesDir[] = "bundle_resources_dir"; | |
465 const char kBundleResourcesDir_HelpShort[] = | |
466 "bundle_resources_dir: " | |
467 "Expansion of {{bundle_resources_dir}} in create_bundle."; | |
468 const char kBundleResourcesDir_Help[] = | |
469 "bundle_resources_dir: " | |
470 "Expansion of {{bundle_resources_dir}} in create_bundle.\n" | |
471 "\n" | |
472 " A string corresponding to a path in $root_build_dir.\n" | |
473 "\n" | |
474 " This string is used by the \"create_bundle\" target to expand the\n" | |
475 " {{bundle_resources_dir}} of the \"bundle_data\" target it depends on.\n" | |
476 " This must correspond to a path under \"bundle_root_dir\".\n" | |
477 "\n" | |
478 " See \"gn help bundle_root_dir\" for examples.\n"; | |
479 | |
480 const char kBundleExecutableDir[] = "bundle_executable_dir"; | |
481 const char kBundleExecutableDir_HelpShort[] = | |
482 "bundle_executable_dir: " | |
483 "Expansion of {{bundle_executable_dir}} in create_bundle."; | |
484 const char kBundleExecutableDir_Help[] = | |
485 "bundle_executable_dir: " | |
486 "Expansion of {{bundle_executable_dir}} in create_bundle.\n" | |
487 "\n" | |
488 " A string corresponding to a path in $root_build_dir.\n" | |
489 "\n" | |
490 " This string is used by the \"create_bundle\" target to expand the\n" | |
491 " {{bundle_executable_dir}} of the \"bundle_data\" target it depends on.\n" | |
492 " This must correspond to a path under \"bundle_root_dir\".\n" | |
493 "\n" | |
494 " See \"gn help bundle_root_dir\" for examples.\n"; | |
495 | |
496 const char kBundlePlugInsDir[] = "bundle_plugins_dir"; | |
497 const char kBundlePlugInsDir_HelpShort[] = | |
498 "bundle_plugins_dir: " | |
499 "Expansion of {{bundle_plugins_dir}} in create_bundle."; | |
500 const char kBundlePlugInsDir_Help[] = | |
501 "bundle_plugins_dir: " | |
502 "Expansion of {{bundle_plugins_dir}} in create_bundle.\n" | |
503 "\n" | |
504 " A string corresponding to a path in $root_build_dir.\n" | |
505 "\n" | |
506 " This string is used by the \"create_bundle\" target to expand the\n" | |
507 " {{bundle_plugins_dir}} of the \"bundle_data\" target it depends on.\n" | |
508 " This must correspond to a path under \"bundle_root_dir\".\n" | |
509 "\n" | |
510 " See \"gn help bundle_root_dir\" for examples.\n"; | |
511 | |
437 const char kCflags[] = "cflags"; | 512 const char kCflags[] = "cflags"; |
438 const char kCflags_HelpShort[] = | 513 const char kCflags_HelpShort[] = |
439 "cflags: [string list] Flags passed to all C compiler variants."; | 514 "cflags: [string list] Flags passed to all C compiler variants."; |
440 const char kCommonCflagsHelp[] = | 515 const char kCommonCflagsHelp[] = |
441 "cflags*: Flags passed to the C compiler.\n" | 516 "cflags*: Flags passed to the C compiler.\n" |
442 "\n" | 517 "\n" |
443 " A list of strings.\n" | 518 " A list of strings.\n" |
444 "\n" | 519 "\n" |
445 " \"cflags\" are passed to all invocations of the C, C++, Objective C,\n" | 520 " \"cflags\" are passed to all invocations of the C, C++, Objective C,\n" |
446 " and Objective C++ compilers.\n" | 521 " and Objective C++ compilers.\n" |
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1450 } | 1525 } |
1451 | 1526 |
1452 const VariableInfoMap& GetTargetVariables() { | 1527 const VariableInfoMap& GetTargetVariables() { |
1453 static VariableInfoMap info_map; | 1528 static VariableInfoMap info_map; |
1454 if (info_map.empty()) { | 1529 if (info_map.empty()) { |
1455 INSERT_VARIABLE(AllDependentConfigs) | 1530 INSERT_VARIABLE(AllDependentConfigs) |
1456 INSERT_VARIABLE(AllowCircularIncludesFrom) | 1531 INSERT_VARIABLE(AllowCircularIncludesFrom) |
1457 INSERT_VARIABLE(Args) | 1532 INSERT_VARIABLE(Args) |
1458 INSERT_VARIABLE(Asmflags) | 1533 INSERT_VARIABLE(Asmflags) |
1459 INSERT_VARIABLE(AssertNoDeps) | 1534 INSERT_VARIABLE(AssertNoDeps) |
1535 INSERT_VARIABLE(BundleRootDir) | |
1536 INSERT_VARIABLE(BundleResourcesDir) | |
1537 INSERT_VARIABLE(BundleExecutableDir) | |
1538 INSERT_VARIABLE(BundlePlugInsDir) | |
1460 INSERT_VARIABLE(Cflags) | 1539 INSERT_VARIABLE(Cflags) |
1461 INSERT_VARIABLE(CflagsC) | 1540 INSERT_VARIABLE(CflagsC) |
1462 INSERT_VARIABLE(CflagsCC) | 1541 INSERT_VARIABLE(CflagsCC) |
1463 INSERT_VARIABLE(CflagsObjC) | 1542 INSERT_VARIABLE(CflagsObjC) |
1464 INSERT_VARIABLE(CflagsObjCC) | 1543 INSERT_VARIABLE(CflagsObjCC) |
1465 INSERT_VARIABLE(CheckIncludes) | 1544 INSERT_VARIABLE(CheckIncludes) |
1466 INSERT_VARIABLE(CompleteStaticLib) | 1545 INSERT_VARIABLE(CompleteStaticLib) |
1467 INSERT_VARIABLE(Configs) | 1546 INSERT_VARIABLE(Configs) |
1468 INSERT_VARIABLE(Console) | 1547 INSERT_VARIABLE(Console) |
1469 INSERT_VARIABLE(Data) | 1548 INSERT_VARIABLE(Data) |
(...skipping 19 matching lines...) Expand all Loading... | |
1489 INSERT_VARIABLE(Sources) | 1568 INSERT_VARIABLE(Sources) |
1490 INSERT_VARIABLE(Testonly) | 1569 INSERT_VARIABLE(Testonly) |
1491 INSERT_VARIABLE(Visibility) | 1570 INSERT_VARIABLE(Visibility) |
1492 } | 1571 } |
1493 return info_map; | 1572 return info_map; |
1494 } | 1573 } |
1495 | 1574 |
1496 #undef INSERT_VARIABLE | 1575 #undef INSERT_VARIABLE |
1497 | 1576 |
1498 } // namespace variables | 1577 } // namespace variables |
OLD | NEW |