| Index: build/android/gyp/ant.py
|
| diff --git a/build/android/gyp/ant.py b/build/android/gyp/ant.py
|
| index 49e44bba6245188e52338ac32a309540606c18d5..5394b9ec7d5ae6792ea54b611ab4c438b3ba48e6 100755
|
| --- a/build/android/gyp/ant.py
|
| +++ b/build/android/gyp/ant.py
|
| @@ -15,6 +15,7 @@ Also, when a command fails, this script will re-run that ant command with the
|
| '-verbose' argument so that the failure is easier to debug.
|
| """
|
|
|
| +import optparse
|
| import sys
|
| import traceback
|
|
|
| @@ -22,14 +23,17 @@ from util import build_utils
|
|
|
|
|
| def main(argv):
|
| + option_parser = optparse.OptionParser()
|
| + build_utils.AddDepfileOption(option_parser)
|
| + options, args = option_parser.parse_args(argv[1:])
|
| +
|
| try:
|
| - args = argv[1:]
|
| stdout = build_utils.CheckOutput(['ant'] + args)
|
| except build_utils.CalledProcessError:
|
| # It is very difficult to diagnose ant failures without the '-verbose'
|
| # argument. So, when an ant command fails, re-run it with '-verbose' so that
|
| # the cause of the failure is easier to identify.
|
| - verbose_args = ['-verbose'] + [a for a in argv[1:] if a != '-quiet']
|
| + verbose_args = ['-verbose'] + [a for a in args if a != '-quiet']
|
| try:
|
| stdout = build_utils.CheckOutput(['ant'] + verbose_args)
|
| except build_utils.CalledProcessError:
|
| @@ -48,6 +52,14 @@ def main(argv):
|
| break
|
| print line
|
|
|
| + if options.depfile:
|
| + assert '-buildfile' in args
|
| + ant_buildfile = args[args.index('-buildfile') + 1]
|
| +
|
| + build_utils.WriteDepfile(
|
| + options.depfile,
|
| + [ant_buildfile] + build_utils.GetPythonDependencies())
|
| +
|
|
|
| if __name__ == '__main__':
|
| sys.exit(main(sys.argv))
|
|
|