OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 | 3 |
4 import gyp | 4 import gyp |
5 import gyp.common | 5 import gyp.common |
6 # TODO(sgk): create a separate "project module" for SCons? | 6 # TODO(sgk): create a separate "project module" for SCons? |
7 #import gyp.SCons as SCons | 7 #import gyp.SCons as SCons |
8 import os | 8 import os |
9 import pprint | 9 import pprint |
10 import re | 10 import re |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 def _SCons_loadable_module_writer(fp, spec): | 72 def _SCons_loadable_module_writer(fp, spec): |
73 name = full_product_name(spec) | 73 name = full_product_name(spec) |
74 # Note: LoadableModule() isn't part of the Hammer API, and there's no | 74 # Note: LoadableModule() isn't part of the Hammer API, and there's no |
75 # ChromeLoadableModule() wrapper for this, so use base SCons for now. | 75 # ChromeLoadableModule() wrapper for this, so use base SCons for now. |
76 builder = 'env.LoadableModule(\'%s\', input_files)' % name | 76 builder = 'env.LoadableModule(\'%s\', input_files)' % name |
77 return _SCons_writer(fp, spec, builder) | 77 return _SCons_writer(fp, spec, builder) |
78 | 78 |
79 SConsTypeWriter = { | 79 SConsTypeWriter = { |
80 None : _SCons_null_writer, | 80 None : _SCons_null_writer, |
81 'none' : _SCons_null_writer, | 81 'none' : _SCons_null_writer, |
82 'application' : _SCons_program_writer, | |
83 'executable' : _SCons_program_writer, | 82 'executable' : _SCons_program_writer, |
84 'static_library' : _SCons_static_library_writer, | 83 'static_library' : _SCons_static_library_writer, |
85 'shared_library' : _SCons_shared_library_writer, | 84 'shared_library' : _SCons_shared_library_writer, |
86 'loadable_module' : _SCons_loadable_module_writer, | 85 'loadable_module' : _SCons_loadable_module_writer, |
87 } | 86 } |
88 | 87 |
89 _command_template = """ | 88 _command_template = """ |
90 _outputs = env.Command( | 89 _outputs = env.Command( |
91 %(outputs)s, | 90 %(outputs)s, |
92 %(inputs)s, | 91 %(inputs)s, |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 | 428 |
430 all_targets = gyp.common.AllTargets(target_list, target_dicts, build_file) | 429 all_targets = gyp.common.AllTargets(target_list, target_dicts, build_file) |
431 sconscript_files = [] | 430 sconscript_files = [] |
432 for t in all_targets: | 431 for t in all_targets: |
433 t = gyp.common.RelativePath(TargetFilename(t, options.suffix), | 432 t = gyp.common.RelativePath(TargetFilename(t, options.suffix), |
434 output_dir) | 433 output_dir) |
435 sconscript_files.append(t) | 434 sconscript_files.append(t) |
436 sconscript_files.sort() | 435 sconscript_files.sort() |
437 | 436 |
438 GenerateSConscriptWrapper(basename, output_filename, sconscript_files) | 437 GenerateSConscriptWrapper(basename, output_filename, sconscript_files) |
OLD | NEW |