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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 "defines: C preprocessor defines.\n" | 386 "defines: C preprocessor defines.\n" |
387 "\n" | 387 "\n" |
388 " A list of strings\n" | 388 " A list of strings\n" |
389 "\n" | 389 "\n" |
390 " These strings will be passed to the C/C++ compiler as #defines. The\n" | 390 " These strings will be passed to the C/C++ compiler as #defines. The\n" |
391 " strings may or may not include an \"=\" to assign a value.\n" | 391 " strings may or may not include an \"=\" to assign a value.\n" |
392 "\n" | 392 "\n" |
393 "Example:\n" | 393 "Example:\n" |
394 " defines = [ \"AWESOME_FEATURE\", \"LOG_LEVEL=3\" ]\n"; | 394 " defines = [ \"AWESOME_FEATURE\", \"LOG_LEVEL=3\" ]\n"; |
395 | 395 |
| 396 const char kDepfile[] = "depfile"; |
| 397 const char kDepfile_HelpShort[] = |
| 398 "depfile: [string] File name for input dependencies for custom targets."; |
| 399 const char kDepfile_Help[] = |
| 400 "depfile: [string] File name for input dependencies for custom targets.\n" |
| 401 "\n" |
| 402 " If nonempty, this string specifies that the current \"custom\" target\n" |
| 403 " will generate the given \".d\" file containing the dependencies of the\n" |
| 404 " input. Empty or unset means that the script doesn't generate the\n" |
| 405 " files.\n" |
| 406 "\n" |
| 407 " The .d file should go in the target output directory. If you have more\n" |
| 408 " than one source file that the script is being run over, you can use\n" |
| 409 " the output file expansions described in \"gn help custom\" to name the\n" |
| 410 " .d file according to the input." |
| 411 "\n" |
| 412 " The format is that of a Makefile, and all of the paths should be\n" |
| 413 " relative to the root build directory.\n" |
| 414 "\n" |
| 415 "Example:\n" |
| 416 " custom(\"myscript_target\") {\n" |
| 417 " script = \"myscript.py\"\n" |
| 418 " sources = [ ... ]\n" |
| 419 "\n" |
| 420 " # Locate the depfile in the output directory named like the\n" |
| 421 " # inputs but with a \".d\" appended.\n" |
| 422 " depfile = \"$relative_target_output_dir/{{source_name}}.d\"\n" |
| 423 "\n" |
| 424 " # Say our script uses \"-o <d file>\" to indicate the depfile.\n" |
| 425 " args = [ \"{{source}}\", \"-o\", depfile ]\n" |
| 426 " }\n"; |
| 427 |
396 const char kDeps[] = "deps"; | 428 const char kDeps[] = "deps"; |
397 const char kDeps_HelpShort[] = | 429 const char kDeps_HelpShort[] = |
398 "deps: [label list] Linked dependencies."; | 430 "deps: [label list] Linked dependencies."; |
399 const char kDeps_Help[] = | 431 const char kDeps_Help[] = |
400 "deps: Linked dependencies.\n" | 432 "deps: Linked dependencies.\n" |
401 "\n" | 433 "\n" |
402 " A list of target labels.\n" | 434 " A list of target labels.\n" |
403 "\n" | 435 "\n" |
404 " Specifies dependencies of a target. Shared and dynamic libraries will\n" | 436 " Specifies dependencies of a target. Shared and dynamic libraries will\n" |
405 " be linked into the current target. Other target types that can't be\n" | 437 " be linked into the current target. Other target types that can't be\n" |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 INSERT_VARIABLE(AllDependentConfigs) | 792 INSERT_VARIABLE(AllDependentConfigs) |
761 INSERT_VARIABLE(Args) | 793 INSERT_VARIABLE(Args) |
762 INSERT_VARIABLE(Cflags) | 794 INSERT_VARIABLE(Cflags) |
763 INSERT_VARIABLE(CflagsC) | 795 INSERT_VARIABLE(CflagsC) |
764 INSERT_VARIABLE(CflagsCC) | 796 INSERT_VARIABLE(CflagsCC) |
765 INSERT_VARIABLE(CflagsObjC) | 797 INSERT_VARIABLE(CflagsObjC) |
766 INSERT_VARIABLE(CflagsObjCC) | 798 INSERT_VARIABLE(CflagsObjCC) |
767 INSERT_VARIABLE(Configs) | 799 INSERT_VARIABLE(Configs) |
768 INSERT_VARIABLE(Data) | 800 INSERT_VARIABLE(Data) |
769 INSERT_VARIABLE(Datadeps) | 801 INSERT_VARIABLE(Datadeps) |
| 802 INSERT_VARIABLE(Depfile) |
770 INSERT_VARIABLE(Deps) | 803 INSERT_VARIABLE(Deps) |
771 INSERT_VARIABLE(DirectDependentConfigs) | 804 INSERT_VARIABLE(DirectDependentConfigs) |
772 INSERT_VARIABLE(External) | 805 INSERT_VARIABLE(External) |
773 INSERT_VARIABLE(ForwardDependentConfigsFrom) | 806 INSERT_VARIABLE(ForwardDependentConfigsFrom) |
774 INSERT_VARIABLE(GypFile) | 807 INSERT_VARIABLE(GypFile) |
775 INSERT_VARIABLE(HardDep) | 808 INSERT_VARIABLE(HardDep) |
776 INSERT_VARIABLE(IncludeDirs) | 809 INSERT_VARIABLE(IncludeDirs) |
777 INSERT_VARIABLE(Ldflags) | 810 INSERT_VARIABLE(Ldflags) |
778 INSERT_VARIABLE(Libs) | 811 INSERT_VARIABLE(Libs) |
779 INSERT_VARIABLE(LibDirs) | 812 INSERT_VARIABLE(LibDirs) |
780 INSERT_VARIABLE(OutputName) | 813 INSERT_VARIABLE(OutputName) |
781 INSERT_VARIABLE(Outputs) | 814 INSERT_VARIABLE(Outputs) |
782 INSERT_VARIABLE(Script) | 815 INSERT_VARIABLE(Script) |
783 INSERT_VARIABLE(SourcePrereqs) | 816 INSERT_VARIABLE(SourcePrereqs) |
784 INSERT_VARIABLE(Sources) | 817 INSERT_VARIABLE(Sources) |
785 } | 818 } |
786 return info_map; | 819 return info_map; |
787 } | 820 } |
788 | 821 |
789 #undef INSERT_VARIABLE | 822 #undef INSERT_VARIABLE |
790 | 823 |
791 } // namespace variables | 824 } // namespace variables |
OLD | NEW |