OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2012 Google Inc. All rights reserved. | 3 # Copyright (c) 2012 Google Inc. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 import copy | 7 import copy |
8 import gyp.input | 8 import gyp.input |
9 import optparse | 9 import optparse |
10 import os.path | 10 import os.path |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 # twice) | 486 # twice) |
487 for format in set(options.formats): | 487 for format in set(options.formats): |
488 params = {'options': options, | 488 params = {'options': options, |
489 'build_files': build_files, | 489 'build_files': build_files, |
490 'generator_flags': generator_flags, | 490 'generator_flags': generator_flags, |
491 'cwd': os.getcwd(), | 491 'cwd': os.getcwd(), |
492 'build_files_arg': build_files_arg, | 492 'build_files_arg': build_files_arg, |
493 'gyp_binary': sys.argv[0], | 493 'gyp_binary': sys.argv[0], |
494 'home_dot_gyp': home_dot_gyp, | 494 'home_dot_gyp': home_dot_gyp, |
495 'parallel': options.parallel, | 495 'parallel': options.parallel, |
496 'root_targets': options.root_targets} | 496 'root_targets': options.root_targets, |
| 497 'target_arch': cmdline_default_variables.get('target_arch', '')} |
497 | 498 |
498 # Start with the default variables from the command line. | 499 # Start with the default variables from the command line. |
499 [generator, flat_list, targets, data] = Load( | 500 [generator, flat_list, targets, data] = Load( |
500 build_files, format, cmdline_default_variables, includes, options.depth, | 501 build_files, format, cmdline_default_variables, includes, options.depth, |
501 params, options.check, options.circular_check) | 502 params, options.check, options.circular_check) |
502 | 503 |
503 # TODO(mark): Pass |data| for now because the generator needs a list of | 504 # TODO(mark): Pass |data| for now because the generator needs a list of |
504 # build files that came in. In the future, maybe it should just accept | 505 # build files that came in. In the future, maybe it should just accept |
505 # a list, and not the whole data dict. | 506 # a list, and not the whole data dict. |
506 # NOTE: flat_list is the flattened dependency graph specifying the order | 507 # NOTE: flat_list is the flattened dependency graph specifying the order |
(...skipping 19 matching lines...) Expand all Loading... |
526 except GypError, e: | 527 except GypError, e: |
527 sys.stderr.write("gyp: %s\n" % e) | 528 sys.stderr.write("gyp: %s\n" % e) |
528 return 1 | 529 return 1 |
529 | 530 |
530 # NOTE: setuptools generated console_scripts calls function with no arguments | 531 # NOTE: setuptools generated console_scripts calls function with no arguments |
531 def script_main(): | 532 def script_main(): |
532 return main(sys.argv[1:]) | 533 return main(sys.argv[1:]) |
533 | 534 |
534 if __name__ == '__main__': | 535 if __name__ == '__main__': |
535 sys.exit(script_main()) | 536 sys.exit(script_main()) |
OLD | NEW |