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

Side by Side Diff: build/android/gyp/util/build_utils.py

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 | « no previous file | tools/gn/variables.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 # Copyright 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 import ast 5 import ast
6 import contextlib 6 import contextlib
7 import fnmatch 7 import fnmatch
8 import json 8 import json
9 import os 9 import os
10 import pipes 10 import pipes
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 return sorted(set(non_system_module_paths)) 413 return sorted(set(non_system_module_paths))
414 414
415 415
416 def AddDepfileOption(parser): 416 def AddDepfileOption(parser):
417 # TODO(agrieve): Get rid of this once we've moved to argparse. 417 # TODO(agrieve): Get rid of this once we've moved to argparse.
418 if hasattr(parser, 'add_option'): 418 if hasattr(parser, 'add_option'):
419 func = parser.add_option 419 func = parser.add_option
420 else: 420 else:
421 func = parser.add_argument 421 func = parser.add_argument
422 func('--depfile', 422 func('--depfile',
423 help='Path to depfile. Must be specified as the action\'s first output.') 423 help='Path to depfile (refer to `gn help depfile`)')
424 424
425 425
426 def WriteDepfile(depfile_path, first_gn_output, inputs=None, add_pydeps=True): 426 def WriteDepfile(depfile_path, first_gn_output, inputs=None, add_pydeps=True):
427 assert depfile_path != first_gn_output # http://crbug.com/646165 427 assert depfile_path != first_gn_output # http://crbug.com/646165
428 inputs = inputs or [] 428 inputs = inputs or []
429 if add_pydeps: 429 if add_pydeps:
430 inputs = GetPythonDependencies() + inputs 430 inputs = GetPythonDependencies() + inputs
431 MakeDirectory(os.path.dirname(depfile_path)) 431 MakeDirectory(os.path.dirname(depfile_path))
432 # Ninja does not support multiple outputs in depfiles. 432 # Ninja does not support multiple outputs in depfiles.
433 with open(depfile_path, 'w') as depfile: 433 with open(depfile_path, 'w') as depfile:
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 536
537 md5_check.CallAndRecordIfStale( 537 md5_check.CallAndRecordIfStale(
538 on_stale_md5, 538 on_stale_md5,
539 record_path=record_path, 539 record_path=record_path,
540 input_paths=input_paths, 540 input_paths=input_paths,
541 input_strings=input_strings, 541 input_strings=input_strings,
542 output_paths=output_paths, 542 output_paths=output_paths,
543 force=force, 543 force=force,
544 pass_changes=True) 544 pass_changes=True)
545 545
OLDNEW
« no previous file with comments | « no previous file | tools/gn/variables.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698