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

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

Issue 2315993003: Reland of GN(Android): Stop specifying depfile under outputs (Closed)
Patch Set: Create depfile parent directory when it doesn't exist 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 | « android_webview/BUILD.gn ('k') | build/config/android/internal_rules.gni » ('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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
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. Must be specified as the action\'s first output.')
424 424
425 425
426 def WriteDepfile(path, dependencies): 426 def WriteDepfile(path, dependencies):
427 MakeDirectory(os.path.dirname(path))
427 with open(path, 'w') as depfile: 428 with open(path, 'w') as depfile:
428 depfile.write(path) 429 depfile.write(path)
429 depfile.write(': ') 430 depfile.write(': ')
430 depfile.write(' '.join(dependencies)) 431 depfile.write(' '.join(dependencies))
431 depfile.write('\n') 432 depfile.write('\n')
432 433
433 434
434 def ExpandFileArgs(args): 435 def ExpandFileArgs(args):
435 """Replaces file-arg placeholders in args. 436 """Replaces file-arg placeholders in args.
436 437
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 530
530 md5_check.CallAndRecordIfStale( 531 md5_check.CallAndRecordIfStale(
531 on_stale_md5, 532 on_stale_md5,
532 record_path=record_path, 533 record_path=record_path,
533 input_paths=input_paths, 534 input_paths=input_paths,
534 input_strings=input_strings, 535 input_strings=input_strings,
535 output_paths=output_paths, 536 output_paths=output_paths,
536 force=force, 537 force=force,
537 pass_changes=True) 538 pass_changes=True)
538 539
OLDNEW
« no previous file with comments | « android_webview/BUILD.gn ('k') | build/config/android/internal_rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698