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

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

Issue 164773005: Pull GN @ 252040, update calls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: long line Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « tools/gn/bin/win/gn.exe.sha1 ('k') | tools/gn/secondary/chrome/BUILD.gn » ('j') | 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/process/kill.h" 8 #include "base/process/kill.h"
9 #include "base/process/launch.h" 9 #include "base/process/launch.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 " (Optional) A list of files that this script reads or otherwise\n" 271 " (Optional) A list of files that this script reads or otherwise\n"
272 " depends on. These dependencies will be added to the build result\n" 272 " depends on. These dependencies will be added to the build result\n"
273 " such that if any of them change, the build will be regenerated and\n" 273 " such that if any of them change, the build will be regenerated and\n"
274 " the script will be re-run.\n" 274 " the script will be re-run.\n"
275 "\n" 275 "\n"
276 " The script itself will be an implicit dependency so you do not\n" 276 " The script itself will be an implicit dependency so you do not\n"
277 " need to list it.\n" 277 " need to list it.\n"
278 "\n" 278 "\n"
279 "Example:\n" 279 "Example:\n"
280 "\n" 280 "\n"
281 " all_lines = exec_script(\"myscript.py\", [some_input], \"list lines\",\n" 281 " all_lines = exec_script(\n"
282 " [ rebase_path(\"data_file.txt\", \".\"," 282 " \"myscript.py\", [some_input], \"list lines\",\n"
283 " root_build_dir) ])\n" 283 " [ rebase_path(\"data_file.txt\", root_build_dir) ])\n"
284 "\n" 284 "\n"
285 " # This example just calls the script with no arguments and discards\n" 285 " # This example just calls the script with no arguments and discards\n"
286 " # the result.\n" 286 " # the result.\n"
287 " exec_script(\"//foo/bar/myscript.py\")\n"; 287 " exec_script(\"//foo/bar/myscript.py\")\n";
288 288
289 Value RunExecScript(Scope* scope, 289 Value RunExecScript(Scope* scope,
290 const FunctionCallNode* function, 290 const FunctionCallNode* function,
291 const std::vector<Value>& args, 291 const std::vector<Value>& args,
292 Err* err) { 292 Err* err) {
293 if (args.size() < 1 || args.size() > 4) { 293 if (args.size() < 1 || args.size() > 4) {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 msg); 406 msg);
407 return Value(); 407 return Value();
408 } 408 }
409 409
410 // Default to None value for the input conversion if unspecified. 410 // Default to None value for the input conversion if unspecified.
411 return ConvertInputToValue(output, function, 411 return ConvertInputToValue(output, function,
412 args.size() >= 3 ? args[2] : Value(), err); 412 args.size() >= 3 ? args[2] : Value(), err);
413 } 413 }
414 414
415 } // namespace functions 415 } // namespace functions
OLDNEW
« no previous file with comments | « tools/gn/bin/win/gn.exe.sha1 ('k') | tools/gn/secondary/chrome/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698