Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(686)

Side by Side Diff: tools/gn/variables.cc

Issue 55633002: GN: Add ability to specify a depfile for custom targets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« tools/gn/value_extractors.h ('K') | « tools/gn/variables.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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"
brettw 2013/11/04 05:22:14 I've been putting a blank line after this in the o
koz (OOO until 15th September) 2013/11/06 07:29:11 Done.
401 " If nonempty, this string specifies that the current \"custom\" target\n"
402 " will generate the given \".d\" file containing the dependencies of the\n"
403 " input. Empty or unset means that the script doesn't generate the\n"
404 " files.\n"
405 "\n"
406 " The .d file should go in the target output directory. If you have more\n"
407 " than one source file that the script is being run over, you can use\n"
408 " the output file expansions described in \"gn help custom\" to name the\n"
409 " .d file according to the input."
410 "\n"
411 " The format is that of a Makefile, and all of the paths should be\n"
412 " relative to the root build directory.\n"
413 "\n"
414 "Example:\n"
415 " custom(\"myscript_target\") {\n"
416 " script = \"myscript.py\"\n"
417 " sources = [ ... ]\n"
418 "\n"
419 " # Locate the deps file in the output directory named like the\n"
420 " # inputs but with a \".d\" appended.\n"
421 " depfile = \"$relative_target_output_dir/{{source_name}}.d\"\n"
422 "\n"
423 " # Say our script uses \"-o <d file>\" to indicate the deps file.\n"
424 " args = [ \"{{source}}\", \"-o\", depfile ]\n"
425 " }\n";
426
396 const char kDeps[] = "deps"; 427 const char kDeps[] = "deps";
397 const char kDeps_HelpShort[] = 428 const char kDeps_HelpShort[] =
398 "deps: [label list] Linked dependencies."; 429 "deps: [label list] Linked dependencies.";
399 const char kDeps_Help[] = 430 const char kDeps_Help[] =
400 "deps: Linked dependencies.\n" 431 "deps: Linked dependencies.\n"
401 "\n" 432 "\n"
402 " A list of target labels.\n" 433 " A list of target labels.\n"
403 "\n" 434 "\n"
404 " Specifies dependencies of a target. Shared and dynamic libraries will\n" 435 " 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" 436 " 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
760 INSERT_VARIABLE(AllDependentConfigs) 791 INSERT_VARIABLE(AllDependentConfigs)
761 INSERT_VARIABLE(Args) 792 INSERT_VARIABLE(Args)
762 INSERT_VARIABLE(Cflags) 793 INSERT_VARIABLE(Cflags)
763 INSERT_VARIABLE(CflagsC) 794 INSERT_VARIABLE(CflagsC)
764 INSERT_VARIABLE(CflagsCC) 795 INSERT_VARIABLE(CflagsCC)
765 INSERT_VARIABLE(CflagsObjC) 796 INSERT_VARIABLE(CflagsObjC)
766 INSERT_VARIABLE(CflagsObjCC) 797 INSERT_VARIABLE(CflagsObjCC)
767 INSERT_VARIABLE(Configs) 798 INSERT_VARIABLE(Configs)
768 INSERT_VARIABLE(Data) 799 INSERT_VARIABLE(Data)
769 INSERT_VARIABLE(Datadeps) 800 INSERT_VARIABLE(Datadeps)
801 INSERT_VARIABLE(Depfile)
770 INSERT_VARIABLE(Deps) 802 INSERT_VARIABLE(Deps)
771 INSERT_VARIABLE(DirectDependentConfigs) 803 INSERT_VARIABLE(DirectDependentConfigs)
772 INSERT_VARIABLE(External) 804 INSERT_VARIABLE(External)
773 INSERT_VARIABLE(ForwardDependentConfigsFrom) 805 INSERT_VARIABLE(ForwardDependentConfigsFrom)
774 INSERT_VARIABLE(GypFile) 806 INSERT_VARIABLE(GypFile)
775 INSERT_VARIABLE(HardDep) 807 INSERT_VARIABLE(HardDep)
776 INSERT_VARIABLE(IncludeDirs) 808 INSERT_VARIABLE(IncludeDirs)
777 INSERT_VARIABLE(Ldflags) 809 INSERT_VARIABLE(Ldflags)
778 INSERT_VARIABLE(Libs) 810 INSERT_VARIABLE(Libs)
779 INSERT_VARIABLE(LibDirs) 811 INSERT_VARIABLE(LibDirs)
780 INSERT_VARIABLE(OutputName) 812 INSERT_VARIABLE(OutputName)
781 INSERT_VARIABLE(Outputs) 813 INSERT_VARIABLE(Outputs)
782 INSERT_VARIABLE(Script) 814 INSERT_VARIABLE(Script)
783 INSERT_VARIABLE(SourcePrereqs) 815 INSERT_VARIABLE(SourcePrereqs)
784 INSERT_VARIABLE(Sources) 816 INSERT_VARIABLE(Sources)
785 } 817 }
786 return info_map; 818 return info_map;
787 } 819 }
788 820
789 #undef INSERT_VARIABLE 821 #undef INSERT_VARIABLE
790 822
791 } // namespace variables 823 } // namespace variables
OLDNEW
« tools/gn/value_extractors.h ('K') | « tools/gn/variables.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698