| OLD | NEW |
| 1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 Google Inc. 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 # Notes: | 5 # Notes: |
| 6 # | 6 # |
| 7 # This generates makefiles suitable for inclusion into the Android build system | 7 # This generates makefiles suitable for inclusion into the Android build system |
| 8 # via an Android.mk file. It is based on make.py, the standard makefile | 8 # via an Android.mk file. It is based on make.py, the standard makefile |
| 9 # generator. | 9 # generator. |
| 10 # | 10 # |
| (...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 997 toolsets = set([target_dicts[target]['toolset'] for target in target_list]) | 997 toolsets = set([target_dicts[target]['toolset'] for target in target_list]) |
| 998 for target in target_list: | 998 for target in target_list: |
| 999 spec = target_dicts[target] | 999 spec = target_dicts[target] |
| 1000 if spec['default_configuration'] != 'Default': | 1000 if spec['default_configuration'] != 'Default': |
| 1001 default_configuration = spec['default_configuration'] | 1001 default_configuration = spec['default_configuration'] |
| 1002 break | 1002 break |
| 1003 if not default_configuration: | 1003 if not default_configuration: |
| 1004 default_configuration = 'Default' | 1004 default_configuration = 'Default' |
| 1005 | 1005 |
| 1006 srcdir = '.' | 1006 srcdir = '.' |
| 1007 makefile_name = 'GypAndroid.mk' + options.suffix | 1007 makefile_name = 'GypAndroid' + options.suffix + '.mk' |
| 1008 makefile_path = os.path.join(options.toplevel_dir, makefile_name) | 1008 makefile_path = os.path.join(options.toplevel_dir, makefile_name) |
| 1009 assert not options.generator_output, ( | 1009 assert not options.generator_output, ( |
| 1010 'The Android backend does not support options.generator_output.') | 1010 'The Android backend does not support options.generator_output.') |
| 1011 make.ensure_directory_exists(makefile_path) | 1011 make.ensure_directory_exists(makefile_path) |
| 1012 root_makefile = open(makefile_path, 'w') | 1012 root_makefile = open(makefile_path, 'w') |
| 1013 | 1013 |
| 1014 root_makefile.write(header) | 1014 root_makefile.write(header) |
| 1015 | 1015 |
| 1016 # We set LOCAL_PATH just once, here, to the top of the project tree. This | 1016 # We set LOCAL_PATH just once, here, to the top of the project tree. This |
| 1017 # allows all the other paths we use to be relative to the Android.mk file, | 1017 # allows all the other paths we use to be relative to the Android.mk file, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 for include_file in sorted(include_list): | 1083 for include_file in sorted(include_list): |
| 1084 root_makefile.write('include $(LOCAL_PATH)/' + include_file + '\n') | 1084 root_makefile.write('include $(LOCAL_PATH)/' + include_file + '\n') |
| 1085 root_makefile.write('\n') | 1085 root_makefile.write('\n') |
| 1086 | 1086 |
| 1087 if generator_flags.get('auto_regeneration', True): | 1087 if generator_flags.get('auto_regeneration', True): |
| 1088 WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files) | 1088 WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files) |
| 1089 | 1089 |
| 1090 root_makefile.write(SHARED_FOOTER) | 1090 root_makefile.write(SHARED_FOOTER) |
| 1091 | 1091 |
| 1092 root_makefile.close() | 1092 root_makefile.close() |
| OLD | NEW |