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

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

Issue 2349743002: Update gn's depfile help text to include more guidance. (Closed)
Patch Set: update build_utils.py help text as swell Created 4 years, 3 months 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
« no previous file with comments | « build/android/gyp/util/build_utils.py ('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 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 const char kDepfile_HelpShort[] = 1018 const char kDepfile_HelpShort[] =
1019 "depfile: [string] File name for input dependencies for actions."; 1019 "depfile: [string] File name for input dependencies for actions.";
1020 const char kDepfile_Help[] = 1020 const char kDepfile_Help[] =
1021 "depfile: [string] File name for input dependencies for actions.\n" 1021 "depfile: [string] File name for input dependencies for actions.\n"
1022 "\n" 1022 "\n"
1023 " If nonempty, this string specifies that the current action or\n" 1023 " If nonempty, this string specifies that the current action or\n"
1024 " action_foreach target will generate the given \".d\" file containing\n" 1024 " action_foreach target will generate the given \".d\" file containing\n"
1025 " the dependencies of the input. Empty or unset means that the script\n" 1025 " the dependencies of the input. Empty or unset means that the script\n"
1026 " doesn't generate the files.\n" 1026 " doesn't generate the files.\n"
1027 "\n" 1027 "\n"
1028 " A depfile should be used only when a target depends on files that are\n"
1029 " not already specified by a target's inputs and sources. Likewise,\n"
1030 " depfiles should specify only those dependencies not already included\n"
1031 " in sources or inputs.\n"
1032 "\n"
1028 " The .d file should go in the target output directory. If you have more\n" 1033 " The .d file should go in the target output directory. If you have more\n"
1029 " than one source file that the script is being run over, you can use\n" 1034 " than one source file that the script is being run over, you can use\n"
1030 " the output file expansions described in \"gn help action_foreach\" to\n" 1035 " the output file expansions described in \"gn help action_foreach\" to\n"
1031 " name the .d file according to the input." 1036 " name the .d file according to the input."
1032 "\n" 1037 "\n"
1033 " The format is that of a Makefile, and all of the paths should be\n" 1038 " The format is that of a Makefile and all paths must be relative to the\n"
1034 " relative to the root build directory.\n" 1039 " root build directory. Only one output may be listed and it must match\n"
1040 " the first output of the action.\n"
1041 "\n"
1042 " Although depfiles are created by an action, they should not be listed\n"
1043 " in the action's \"outputs\" unless another target will use the file as\n"
1044 " an input.\n"
1035 "\n" 1045 "\n"
1036 "Example\n" 1046 "Example\n"
1037 "\n" 1047 "\n"
1038 " action_foreach(\"myscript_target\") {\n" 1048 " action_foreach(\"myscript_target\") {\n"
1039 " script = \"myscript.py\"\n" 1049 " script = \"myscript.py\"\n"
1040 " sources = [ ... ]\n" 1050 " sources = [ ... ]\n"
1041 "\n" 1051 "\n"
1042 " # Locate the depfile in the output directory named like the\n" 1052 " # Locate the depfile in the output directory named like the\n"
1043 " # inputs but with a \".d\" appended.\n" 1053 " # inputs but with a \".d\" appended.\n"
1044 " depfile = \"$relative_target_output_dir/{{source_name}}.d\"\n" 1054 " depfile = \"$relative_target_output_dir/{{source_name}}.d\"\n"
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
1886 INSERT_VARIABLE(Testonly) 1896 INSERT_VARIABLE(Testonly)
1887 INSERT_VARIABLE(Visibility) 1897 INSERT_VARIABLE(Visibility)
1888 INSERT_VARIABLE(WriteRuntimeDeps) 1898 INSERT_VARIABLE(WriteRuntimeDeps)
1889 } 1899 }
1890 return info_map; 1900 return info_map;
1891 } 1901 }
1892 1902
1893 #undef INSERT_VARIABLE 1903 #undef INSERT_VARIABLE
1894 1904
1895 } // namespace variables 1905 } // namespace variables
OLDNEW
« no previous file with comments | « build/android/gyp/util/build_utils.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698