OLD | NEW |
1 # Copyright (c) 2011 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 """ | 5 """ |
6 SCons generator. | 6 SCons generator. |
7 | 7 |
8 This contains class definitions and supporting functions for generating | 8 This contains class definitions and supporting functions for generating |
9 pieces of SCons files for the different types of GYP targets. | 9 pieces of SCons files for the different types of GYP targets. |
10 """ | 10 """ |
11 | 11 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 """ | 77 """ |
78 fp.write('\n' + pre) | 78 fp.write('\n' + pre) |
79 fp.write('_outputs = %s\n' % self.builder_call()) | 79 fp.write('_outputs = %s\n' % self.builder_call()) |
80 fp.write('target_files.extend(_outputs)\n') | 80 fp.write('target_files.extend(_outputs)\n') |
81 | 81 |
82 | 82 |
83 class NoneTarget(TargetBase): | 83 class NoneTarget(TargetBase): |
84 """ | 84 """ |
85 A GYP target type of 'none', implicitly or explicitly. | 85 A GYP target type of 'none', implicitly or explicitly. |
86 """ | 86 """ |
87 def write_target(self, fp, pre=''): | 87 def write_target(self, fp, src_dir='', pre=''): |
88 fp.write('\ntarget_files.extend(input_files)\n') | 88 fp.write('\ntarget_files.extend(input_files)\n') |
89 | 89 |
90 | 90 |
91 class SettingsTarget(TargetBase): | 91 class SettingsTarget(TargetBase): |
92 """ | 92 """ |
93 A GYP target type of 'settings'. | 93 A GYP target type of 'settings'. |
94 """ | 94 """ |
95 is_ignored = True | 95 is_ignored = True |
96 | 96 |
97 | 97 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 'settings' : SettingsTarget, | 190 'settings' : SettingsTarget, |
191 'executable' : ProgramTarget, | 191 'executable' : ProgramTarget, |
192 'static_library' : StaticLibraryTarget, | 192 'static_library' : StaticLibraryTarget, |
193 'shared_library' : SharedLibraryTarget, | 193 'shared_library' : SharedLibraryTarget, |
194 'loadable_module' : LoadableModuleTarget, | 194 'loadable_module' : LoadableModuleTarget, |
195 } | 195 } |
196 | 196 |
197 | 197 |
198 def Target(spec): | 198 def Target(spec): |
199 return TargetMap[spec.get('type')](spec) | 199 return TargetMap[spec.get('type')](spec) |
OLD | NEW |