Chromium Code Reviews| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 } | 43 } |
| 44 | 44 |
| 45 # Make supports multiple toolsets | 45 # Make supports multiple toolsets |
| 46 generator_supports_multiple_toolsets = True | 46 generator_supports_multiple_toolsets = True |
| 47 | 47 |
| 48 | 48 |
| 49 # Generator-specific gyp specs. | 49 # Generator-specific gyp specs. |
| 50 generator_additional_non_configuration_keys = [ | 50 generator_additional_non_configuration_keys = [ |
| 51 # Boolean to declare that this target does not want its name mangled. | 51 # Boolean to declare that this target does not want its name mangled. |
| 52 'android_unmangled_name', | 52 'android_unmangled_name', |
| 53 # Map of android build system variables to set. | |
| 54 'android_build_settings', | |
| 53 ] | 55 ] |
| 54 generator_additional_path_sections = [] | 56 generator_additional_path_sections = [] |
| 55 generator_extra_sources_for_rules = [] | 57 generator_extra_sources_for_rules = [] |
| 56 | 58 |
| 57 | 59 |
| 58 ALL_MODULES_FOOTER = """\ | 60 ALL_MODULES_FOOTER = """\ |
| 59 # "gyp_all_modules" is a concatenation of the "gyp_all_modules" targets from | 61 # "gyp_all_modules" is a concatenation of the "gyp_all_modules" targets from |
| 60 # all the included sub-makefiles. This is just here to clarify. | 62 # all the included sub-makefiles. This is just here to clarify. |
| 61 gyp_all_modules: | 63 gyp_all_modules: |
| 62 """ | 64 """ |
| (...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 842 deps, link_deps: dependency lists; see ComputeDeps() | 844 deps, link_deps: dependency lists; see ComputeDeps() |
| 843 part_of_all: flag indicating this target is part of 'all' | 845 part_of_all: flag indicating this target is part of 'all' |
| 844 write_alias_target: flag indicating whether to create short aliases for this | 846 write_alias_target: flag indicating whether to create short aliases for this |
| 845 target | 847 target |
| 846 """ | 848 """ |
| 847 self.WriteLn('### Rules for final target.') | 849 self.WriteLn('### Rules for final target.') |
| 848 | 850 |
| 849 if self.type != 'none': | 851 if self.type != 'none': |
| 850 self.WriteTargetFlags(spec, configs, link_deps) | 852 self.WriteTargetFlags(spec, configs, link_deps) |
| 851 | 853 |
| 854 settings = spec.get('android_build_settings', {}) | |
|
Primiano Tucci (use gerrit)
2014/09/12 12:22:52
Are you deliberately emitting this before all the
Torne
2014/09/12 13:13:04
This is at the end; this is the function that emit
| |
| 855 if settings: | |
| 856 self.WriteLn('### Manually overridden build settings') | |
|
Primiano Tucci (use gerrit)
2014/09/12 12:22:52
I'd mention android_build_settings here.
Reading t
Torne
2014/09/12 13:13:04
Yeah, good point, I'll change it.
| |
| 857 for k, v in settings.iteritems(): | |
| 858 if isinstance(v, list): | |
| 859 self.WriteList(v, k) | |
| 860 else: | |
| 861 self.WriteLn('%s := %s' % (k, make.QuoteIfNecessary(v))) | |
| 862 self.WriteLn('') | |
| 863 | |
| 852 # Add to the set of targets which represent the gyp 'all' target. We use the | 864 # Add to the set of targets which represent the gyp 'all' target. We use the |
| 853 # name 'gyp_all_modules' as the Android build system doesn't allow the use | 865 # name 'gyp_all_modules' as the Android build system doesn't allow the use |
| 854 # of the Make target 'all' and because 'all_modules' is the equivalent of | 866 # of the Make target 'all' and because 'all_modules' is the equivalent of |
| 855 # the Make target 'all' on Android. | 867 # the Make target 'all' on Android. |
| 856 if part_of_all and write_alias_target: | 868 if part_of_all and write_alias_target: |
| 857 self.WriteLn('# Add target alias to "gyp_all_modules" target.') | 869 self.WriteLn('# Add target alias to "gyp_all_modules" target.') |
| 858 self.WriteLn('.PHONY: gyp_all_modules') | 870 self.WriteLn('.PHONY: gyp_all_modules') |
| 859 self.WriteLn('gyp_all_modules: %s' % self.android_module) | 871 self.WriteLn('gyp_all_modules: %s' % self.android_module) |
| 860 self.WriteLn('') | 872 self.WriteLn('') |
| 861 | 873 |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1089 # Write out the sorted list of includes. | 1101 # Write out the sorted list of includes. |
| 1090 root_makefile.write('\n') | 1102 root_makefile.write('\n') |
| 1091 for include_file in sorted(include_list): | 1103 for include_file in sorted(include_list): |
| 1092 root_makefile.write('include $(LOCAL_PATH)/' + include_file + '\n') | 1104 root_makefile.write('include $(LOCAL_PATH)/' + include_file + '\n') |
| 1093 root_makefile.write('\n') | 1105 root_makefile.write('\n') |
| 1094 | 1106 |
| 1095 if write_alias_targets: | 1107 if write_alias_targets: |
| 1096 root_makefile.write(ALL_MODULES_FOOTER) | 1108 root_makefile.write(ALL_MODULES_FOOTER) |
| 1097 | 1109 |
| 1098 root_makefile.close() | 1110 root_makefile.close() |
| OLD | NEW |