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

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

Issue 1346653004: Fix some typos in gn's documentation for "copy". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rerun "gn help --markdown all > tools/gn/docs/reference.md" Created 5 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
« tools/gn/docs/reference.md ('K') | « tools/gn/docs/reference.md ('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/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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 const char kCopy_Help[] = 245 const char kCopy_Help[] =
246 "copy: Declare a target that copies files.\n" 246 "copy: Declare a target that copies files.\n"
247 "\n" 247 "\n"
248 "File name handling\n" 248 "File name handling\n"
249 "\n" 249 "\n"
250 " All output files must be inside the output directory of the build.\n" 250 " All output files must be inside the output directory of the build.\n"
251 " You would generally use |$target_out_dir| or |$target_gen_dir| to\n" 251 " You would generally use |$target_out_dir| or |$target_gen_dir| to\n"
252 " reference the output or generated intermediate file directories,\n" 252 " reference the output or generated intermediate file directories,\n"
253 " respectively.\n" 253 " respectively.\n"
254 "\n" 254 "\n"
255 " Both \"sources\" and \"outputs\" must be specified. Sources can\n" 255 " Both \"sources\" and \"outputs\" must be specified. Sources can "
256 "include\n"
256 " as many files as you want, but there can only be one item in the\n" 257 " as many files as you want, but there can only be one item in the\n"
257 " outputs list (plural is used for the name for consistency with\n" 258 " outputs list (plural is used for the name for consistency with\n"
258 " other target types).\n" 259 " other target types).\n"
259 "\n" 260 "\n"
260 " If there is more than one source file, your output name should specify\n" 261 " If there is more than one source file, your output name should specify\n"
261 " a mapping from each source files to output file names using source\n" 262 " a mapping from each source file to an output file name using source\n"
262 " expansion (see \"gn help source_expansion\"). The placeholders will\n" 263 " expansion (see \"gn help source_expansion\"). The placeholders will\n"
263 " will look like \"{{source_name_part}}\", for example.\n" 264 " look like \"{{source_name_part}}\", for example.\n"
264 "\n" 265 "\n"
265 "Examples\n" 266 "Examples\n"
266 "\n" 267 "\n"
267 " # Write a rule that copies a checked-in DLL to the output directory.\n" 268 " # Write a rule that copies a checked-in DLL to the output directory.\n"
268 " copy(\"mydll\") {\n" 269 " copy(\"mydll\") {\n"
269 " sources = [ \"mydll.dll\" ]\n" 270 " sources = [ \"mydll.dll\" ]\n"
270 " outputs = [ \"$target_out_dir/mydll.dll\" ]\n" 271 " outputs = [ \"$target_out_dir/mydll.dll\" ]\n"
271 " }\n" 272 " }\n"
272 "\n" 273 "\n"
273 " # Write a rule to copy several files to the target generated files\n" 274 " # Write a rule to copy several files to the target generated files\n"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 const Template* templ = scope->GetTemplate(target_type); 521 const Template* templ = scope->GetTemplate(target_type);
521 if (templ) 522 if (templ)
522 return templ->Invoke(scope, function, sub_args, block, err); 523 return templ->Invoke(scope, function, sub_args, block, err);
523 524
524 // Otherwise, assume the target is a built-in target type. 525 // Otherwise, assume the target is a built-in target type.
525 return ExecuteGenericTarget(target_type.c_str(), scope, function, sub_args, 526 return ExecuteGenericTarget(target_type.c_str(), scope, function, sub_args,
526 block, err); 527 block, err);
527 } 528 }
528 529
529 } // namespace functions 530 } // namespace functions
OLDNEW
« tools/gn/docs/reference.md ('K') | « tools/gn/docs/reference.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698