| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 import copy | 3 import copy |
| 4 import gyp.input | 4 import gyp.input |
| 5 import optparse | 5 import optparse |
| 6 import os.path | 6 import os.path |
| 7 import re | 7 import re |
| 8 import shlex | 8 import shlex |
| 9 import sys | 9 import sys |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 'generator_handles_variants': | 64 'generator_handles_variants': |
| 65 getattr(generator, 'generator_handles_variants', False), | 65 getattr(generator, 'generator_handles_variants', False), |
| 66 'non_configuration_keys': | 66 'non_configuration_keys': |
| 67 getattr(generator, 'generator_additional_non_configuration_keys', []), | 67 getattr(generator, 'generator_additional_non_configuration_keys', []), |
| 68 'path_sections': | 68 'path_sections': |
| 69 getattr(generator, 'generator_additional_path_sections', []), | 69 getattr(generator, 'generator_additional_path_sections', []), |
| 70 'extra_sources_for_rules': | 70 'extra_sources_for_rules': |
| 71 getattr(generator, 'generator_extra_sources_for_rules', []), | 71 getattr(generator, 'generator_extra_sources_for_rules', []), |
| 72 } | 72 } |
| 73 | 73 |
| 74 print "OS =",default_variables['OS'] |
| 75 |
| 74 # Process the input specific to this generator. | 76 # Process the input specific to this generator. |
| 75 result = gyp.input.Load(build_files, default_variables, includes[:], | 77 result = gyp.input.Load(build_files, default_variables, includes[:], |
| 76 depth, generator_input_info) | 78 depth, generator_input_info) |
| 77 return [generator] + result | 79 return [generator] + result |
| 78 | 80 |
| 79 def NameValueListToDict(name_value_list): | 81 def NameValueListToDict(name_value_list): |
| 80 """ | 82 """ |
| 81 Takes an array of strings of the form 'NAME=VALUE' and creates a dictionary | 83 Takes an array of strings of the form 'NAME=VALUE' and creates a dictionary |
| 82 of the pairs. If a string is simply NAME, then the value in the dictionary | 84 of the pairs. If a string is simply NAME, then the value in the dictionary |
| 83 is set to True. If VALUE can be converted to an integer, it is. | 85 is set to True. If VALUE can be converted to an integer, it is. |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 generate_formats = os.environ.get('GYP_GENERATORS', []) | 162 generate_formats = os.environ.get('GYP_GENERATORS', []) |
| 161 if generate_formats: | 163 if generate_formats: |
| 162 generate_formats = re.split('[\s,]', generate_formats) | 164 generate_formats = re.split('[\s,]', generate_formats) |
| 163 if generate_formats: | 165 if generate_formats: |
| 164 options.formats = generate_formats | 166 options.formats = generate_formats |
| 165 else: | 167 else: |
| 166 # Nothing in the variable, default based on platform. | 168 # Nothing in the variable, default based on platform. |
| 167 options.formats = [ {'darwin': 'xcode', | 169 options.formats = [ {'darwin': 'xcode', |
| 168 'win32': 'msvs', | 170 'win32': 'msvs', |
| 169 'cygwin': 'msvs', | 171 'cygwin': 'msvs', |
| 172 'freebsd6': 'make', |
| 170 'freebsd7': 'make', | 173 'freebsd7': 'make', |
| 171 'freebsd8': 'make', | 174 'freebsd8': 'make', |
| 172 'linux2': 'scons',}[sys.platform] ] | 175 'linux2': 'scons',}[sys.platform] ] |
| 173 | 176 |
| 174 if not build_files: | 177 if not build_files: |
| 175 build_files = FindBuildFiles() | 178 build_files = FindBuildFiles() |
| 176 if not build_files: | 179 if not build_files: |
| 177 print >>sys.stderr, (usage + '\n\n%s: error: no build_file') % \ | 180 print >>sys.stderr, (usage + '\n\n%s: error: no build_file') % \ |
| 178 (my_name, my_name) | 181 (my_name, my_name) |
| 179 return 1 | 182 return 1 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 # need to have dependencies defined before dependents reference them should | 273 # need to have dependencies defined before dependents reference them should |
| 271 # generate targets in the order specified in flat_list. | 274 # generate targets in the order specified in flat_list. |
| 272 generator.GenerateOutput(flat_list, targets, data, params) | 275 generator.GenerateOutput(flat_list, targets, data, params) |
| 273 | 276 |
| 274 # Done | 277 # Done |
| 275 return 0 | 278 return 0 |
| 276 | 279 |
| 277 | 280 |
| 278 if __name__ == '__main__': | 281 if __name__ == '__main__': |
| 279 sys.exit(main(sys.argv[1:])) | 282 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |