OLD | NEW |
---|---|
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright 2010 The Native Client Authors. All rights reserved. | 2 # Copyright 2010 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can | 3 # Use of this source code is governed by a BSD-style license that can |
4 # be found in the LICENSE file. | 4 # be found in the LICENSE file. |
5 | 5 |
6 # The source files (.cc and .h) listed in this file are maintained by the | 6 # The source files (.cc and .h) listed in this file are maintained by the |
7 # script ./update-scons.py. Update $SOURCE_ROOT/ppapi and run the script | 7 # script ./update-scons.py. Update $SOURCE_ROOT/ppapi and run the script |
8 # ./update-scons.py to update all of the source files listed here. | 8 # ./update-scons.py to update all of the source files listed here. |
9 | 9 |
10 # update-scons.py reads the .scons files in this directory. It replaces all | 10 # update-scons.py reads the .scons files in this directory. It replaces all |
(...skipping 10 matching lines...) Expand all Loading... | |
21 # ... | 21 # ... |
22 # # End ppapi.gyp | 22 # # End ppapi.gyp |
23 # | 23 # |
24 # then this script will remove all of the lines between the starting marker and | 24 # then this script will remove all of the lines between the starting marker and |
25 # the ending marker. It will then find the 'ppapi_c' target in the ppapi.gyp | 25 # the ending marker. It will then find the 'ppapi_c' target in the ppapi.gyp |
26 # file. It will find all 'sources' for that target that match the regular | 26 # file. It will find all 'sources' for that target that match the regular |
27 # expression '.*\.h' and will insert each of those source files in between the | 27 # expression '.*\.h' and will insert each of those source files in between the |
28 # two markers. | 28 # two markers. |
29 | 29 |
30 import os | 30 import os |
31 import re | |
31 | 32 |
32 Import('env') | 33 Import('env') |
33 | 34 |
34 # Underlay $SOURCE_ROOT/ppapi in this directory. | 35 # Underlay $SOURCE_ROOT/ppapi in this directory. |
35 Dir('.').addRepository(Dir('#/../ppapi')) | 36 Dir('.').addRepository(Dir('#/../ppapi')) |
36 | 37 |
37 cpp_sources = [ | |
38 # Updated automatically by update-scons.py. | |
39 # From ppapi_cpp.gypi:ppapi_cpp_objects:.*\.cc | |
40 'cpp/audio.cc', | |
41 'cpp/audio_config.cc', | |
42 'cpp/core.cc', | |
43 'cpp/graphics_2d.cc', | |
44 'cpp/image_data.cc', | |
45 'cpp/instance.cc', | |
46 'cpp/module.cc', | |
47 'cpp/paint_aggregator.cc', | |
48 'cpp/paint_manager.cc', | |
49 'cpp/rect.cc', | |
50 'cpp/resource.cc', | |
51 'cpp/url_loader.cc', | |
52 'cpp/url_request_info.cc', | |
53 'cpp/url_response_info.cc', | |
54 'cpp/var.cc', | |
55 'cpp/dev/buffer_dev.cc', | |
56 'cpp/dev/context_3d_dev.cc', | |
57 'cpp/dev/directory_entry_dev.cc', | |
58 'cpp/dev/directory_reader_dev.cc', | |
59 'cpp/dev/file_chooser_dev.cc', | |
60 'cpp/dev/file_io_dev.cc', | |
61 'cpp/dev/file_ref_dev.cc', | |
62 'cpp/dev/file_system_dev.cc', | |
63 'cpp/dev/find_dev.cc', | |
64 'cpp/dev/font_dev.cc', | |
65 'cpp/dev/fullscreen_dev.cc', | |
66 'cpp/dev/graphics_3d_client_dev.cc', | |
67 'cpp/dev/graphics_3d_dev.cc', | |
68 'cpp/dev/printing_dev.cc', | |
69 'cpp/dev/scrollbar_dev.cc', | |
70 'cpp/dev/selection_dev.cc', | |
71 'cpp/dev/surface_3d_dev.cc', | |
72 'cpp/dev/transport_dev.cc', | |
73 'cpp/dev/url_util_dev.cc', | |
74 'cpp/dev/video_decoder_dev.cc', | |
75 'cpp/dev/widget_client_dev.cc', | |
76 'cpp/dev/widget_dev.cc', | |
77 'cpp/dev/zoom_dev.cc', | |
78 'cpp/dev/scriptable_object_deprecated.cc', | |
79 # End ppapi_cpp.gypi | |
80 # Updated automatically by update-scons.py. | |
81 # From ppapi_cpp.gypi:ppapi_cpp:.*\.cc | |
82 'cpp/ppp_entrypoints.cc', | |
83 # End ppapi_cpp.gypi | |
84 ] | |
85 | 38 |
39 # Load ppapi_cpp.gypi | |
40 ppapi_cpp_gypi_filename = env.File('#/../ppapi/ppapi_cpp.gypi').path | |
41 ppapi_cpp_gypi = eval(open(ppapi_cpp_gypi_filename).read()) | |
Mark Seaborn
2011/03/22 01:17:27
Ditto.
Hmm, all this logic is duplicated.
bradn
2011/03/22 01:51:43
Done.
| |
42 | |
43 # Extract several targets from ppapi_cpp.gypi | |
44 ppapi_cpp_objects = [t for t in ppapi_cpp_gypi['targets'] | |
45 if t['target_name'] == 'ppapi_cpp_objects'][0] | |
46 ppapi_cpp = [t for t in ppapi_cpp_gypi['targets'] | |
47 if t['target_name'] == 'ppapi_cpp'][0] | |
48 ppapi_c = [t for t in ppapi_cpp_gypi['targets'] | |
49 if t['target_name'] == 'ppapi_c'][0] | |
50 | |
51 # From ppapi_cpp.gypi:ppapi_cpp_objects:.*\.cc | |
52 # From ppapi_cpp.gypi:ppapi_cpp:.*\.cc | |
53 cpp_sources = ([s for s in ppapi_cpp_objects['sources'] | |
54 if s.endswith('.cc')] + | |
55 [s for s in ppapi_cpp['sources'] | |
56 if s.endswith('.cc')]) | |
86 env.ComponentLibrary('ppapi_cpp', cpp_sources) | 57 env.ComponentLibrary('ppapi_cpp', cpp_sources) |
87 | 58 |
59 | |
88 env.Append(CPPPATH=[ | 60 env.Append(CPPPATH=[ |
89 '$SOURCE_ROOT/ppapi/lib/gl/gles2']) | 61 '$SOURCE_ROOT/ppapi/lib/gl/gles2']) |
90 | 62 |
91 gles2_sources = [ | 63 # Load ppapi_gl.gypi |
92 # Updated automatically by update-scons.py. | 64 ppapi_cpp_gypi_filename = env.File('#/../ppapi/ppapi_gl.gypi').path |
93 # From ppapi_gl.gypi:ppapi_gles2:.*\.c | 65 ppapi_cpp_gypi = eval(open(ppapi_cpp_gypi_filename).read()) |
94 'lib/gl/gles2/gl2ext_ppapi.c', | 66 # Extract ppapi_cpp + ppapi_cpp_objects. |
95 'lib/gl/gles2/gles2.c', | 67 ppapi_gles2 = [t for t in ppapi_cpp_gypi['targets'] |
96 # End ppapi_gl.gypi | 68 if t['target_name'] == 'ppapi_gles2'][0] |
97 ] | |
98 | 69 |
70 # From ppapi_gl.gypi:ppapi_gles2:.*\.c | |
71 gles2_sources = [s for s in ppapi_gles2['sources'] | |
72 if s.endswith('.cpp')] | |
99 env.ComponentLibrary('ppapi_gles2', gles2_sources) | 73 env.ComponentLibrary('ppapi_gles2', gles2_sources) |
100 | 74 |
101 c_headers = [ | |
102 # Updated automatically by update-scons.py. | |
103 # From ppapi_cpp.gypi:ppapi_c:c/[^/]*\.h | |
104 'c/pp_bool.h', | |
105 'c/pp_completion_callback.h', | |
106 'c/pp_errors.h', | |
107 'c/pp_input_event.h', | |
108 'c/pp_instance.h', | |
109 'c/pp_macros.h', | |
110 'c/pp_module.h', | |
111 'c/pp_point.h', | |
112 'c/pp_rect.h', | |
113 'c/pp_resource.h', | |
114 'c/pp_size.h', | |
115 'c/pp_stdint.h', | |
116 'c/pp_time.h', | |
117 'c/pp_var.h', | |
118 'c/ppb.h', | |
119 'c/ppb_audio.h', | |
120 'c/ppb_audio_config.h', | |
121 'c/ppb_core.h', | |
122 'c/ppb_class.h', | |
123 'c/ppb_graphics_2d.h', | |
124 'c/ppb_image_data.h', | |
125 'c/ppb_instance.h', | |
126 'c/ppb_url_loader.h', | |
127 'c/ppb_url_request_info.h', | |
128 'c/ppb_url_response_info.h', | |
129 'c/ppb_var.h', | |
130 'c/ppp.h', | |
131 'c/ppp_instance.h', | |
132 # End ppapi_cpp.gypi | |
133 ] | |
134 | 75 |
135 c_dev_headers = [ | 76 # From ppapi_cpp.gypi:ppapi_c:c/[^/]*\.h |
136 # Updated automatically by update-scons.py. | 77 c_headers = [s for s in ppapi_c['sources'] |
137 # From ppapi_cpp.gypi:ppapi_c:c/dev/[^/]*\.h | 78 if re.match('^c/[^/]*\.h#', s)] |
138 'c/dev/pp_cursor_type_dev.h', | |
139 'c/dev/pp_file_info_dev.h', | |
140 'c/dev/pp_graphics_3d_dev.h', | |
141 'c/dev/pp_video_dev.h', | |
142 'c/dev/ppb_buffer_dev.h', | |
143 'c/dev/ppb_char_set_dev.h', | |
144 'c/dev/ppb_context_3d_dev.h', | |
145 'c/dev/ppb_context_3d_trusted_dev.h', | |
146 'c/dev/ppb_cursor_control_dev.h', | |
147 'c/dev/ppb_directory_reader_dev.h', | |
148 'c/dev/ppb_file_chooser_dev.h', | |
149 'c/dev/ppb_file_io_dev.h', | |
150 'c/dev/ppb_file_io_trusted_dev.h', | |
151 'c/dev/ppb_file_ref_dev.h', | |
152 'c/dev/ppb_file_system_dev.h', | |
153 'c/dev/ppb_find_dev.h', | |
154 'c/dev/ppb_font_dev.h', | |
155 'c/dev/ppb_fullscreen_dev.h', | |
156 'c/dev/ppb_graphics_3d_dev.h', | |
157 'c/dev/ppb_opengles_dev.h', | |
158 'c/dev/ppb_scrollbar_dev.h', | |
159 'c/dev/ppb_surface_3d_dev.h', | |
160 'c/dev/ppb_testing_dev.h', | |
161 'c/dev/ppb_transport_dev.h', | |
162 'c/dev/ppb_url_util_dev.h', | |
163 'c/dev/ppb_video_decoder_dev.h', | |
164 'c/dev/ppb_widget_dev.h', | |
165 'c/dev/ppb_zoom_dev.h', | |
166 'c/dev/ppp_cursor_control_dev.h', | |
167 'c/dev/ppp_find_dev.h', | |
168 'c/dev/ppp_graphics_3d_dev.h', | |
169 'c/dev/ppp_scrollbar_dev.h', | |
170 'c/dev/ppp_selection_dev.h', | |
171 'c/dev/ppp_printing_dev.h', | |
172 'c/dev/ppp_widget_dev.h', | |
173 'c/dev/ppp_zoom_dev.h', | |
174 'c/dev/deprecated_bool.h', | |
175 'c/dev/ppb_var_deprecated.h', | |
176 'c/dev/ppp_class_deprecated.h', | |
177 # End ppapi_cpp.gypi | |
178 ] | |
179 | 79 |
180 cpp_headers = [ | 80 # From ppapi_cpp.gypi:ppapi_c:c/dev/[^/]*\.h |
181 # Updated automatically by update-scons.py. | 81 c_dev_headers = [s for s in ppapi_c['sources'] |
182 # From ppapi_cpp.gypi:ppapi_cpp_objects:cpp/[^/]*\.h | 82 if re.match('^c/dev/[^/]*\.h$', s)] |
183 'cpp/audio.h', | |
184 'cpp/audio_config.h', | |
185 'cpp/common.h', | |
186 'cpp/completion_callback.h', | |
187 'cpp/core.h', | |
188 'cpp/graphics_2d.h', | |
189 'cpp/image_data.h', | |
190 'cpp/instance.h', | |
191 'cpp/logging.h', | |
192 'cpp/module.h', | |
193 'cpp/module_impl.h', | |
194 'cpp/non_thread_safe_ref_count.h', | |
195 'cpp/paint_aggregator.h', | |
196 'cpp/paint_manager.h', | |
197 'cpp/point.h', | |
198 'cpp/rect.h', | |
199 'cpp/resource.h', | |
200 'cpp/size.h', | |
201 'cpp/url_loader.h', | |
202 'cpp/url_request_info.h', | |
203 'cpp/url_response_info.h', | |
204 'cpp/var.h', | |
205 # End ppapi_cpp.gypi | |
206 # Updated automatically by update-scons.py. | |
207 # From ppapi_cpp.gypi:ppapi_cpp:cpp/[^/]*\.h | |
208 'cpp/module_embedder.h', | |
209 # End ppapi_cpp.gypi | |
210 ] | |
211 | 83 |
212 cpp_dev_headers = [ | 84 # From ppapi_cpp.gypi:ppapi_cpp_objects:cpp/[^/]*\.h |
213 # Updated automatically by update-scons.py. | 85 # From ppapi_cpp.gypi:ppapi_cpp:cpp/[^/]*\.h |
214 # From ppapi_cpp.gypi:ppapi_cpp_objects:cpp/dev/[^/]*\.h | 86 cpp_headers = ([s for s in ppapi_cpp_objects['sources'] |
215 'cpp/dev/buffer_dev.h', | 87 if re.match('^cpp/[^/]*\.h$', s)] + |
Mark Seaborn
2011/03/22 01:17:27
The '^' should be redundant in re.match(), FWIW.
bradn
2011/03/22 01:51:43
Done.
| |
216 'cpp/dev/context_3d_dev.h', | 88 [s for s in ppapi_cpp['sources'] |
217 'cpp/dev/directory_entry_dev.h', | 89 if re.match('^cpp/[^/]*\.h$', s)]) |
218 'cpp/dev/directory_reader_dev.h', | |
219 'cpp/dev/file_chooser_dev.h', | |
220 'cpp/dev/file_io_dev.h', | |
221 'cpp/dev/file_ref_dev.h', | |
222 'cpp/dev/file_system_dev.h', | |
223 'cpp/dev/find_dev.h', | |
224 'cpp/dev/font_dev.h', | |
225 'cpp/dev/fullscreen_dev.h', | |
226 'cpp/dev/graphics_3d_client_dev.h', | |
227 'cpp/dev/graphics_3d_dev.h', | |
228 'cpp/dev/printing_dev.h', | |
229 'cpp/dev/scrollbar_dev.h', | |
230 'cpp/dev/selection_dev.h', | |
231 'cpp/dev/surface_3d_dev.h', | |
232 'cpp/dev/transport_dev.h', | |
233 'cpp/dev/url_util_dev.h', | |
234 'cpp/dev/video_decoder_dev.h', | |
235 'cpp/dev/widget_client_dev.h', | |
236 'cpp/dev/widget_dev.h', | |
237 'cpp/dev/zoom_dev.h', | |
238 'cpp/dev/scriptable_object_deprecated.h', | |
239 # End ppapi_cpp.gypi | |
240 ] | |
241 | 90 |
242 gles2_headers = [ | 91 # From ppapi_cpp.gypi:ppapi_cpp_objects:cpp/dev/[^/]*\.h |
243 # Updated automatically by update-scons.py. | 92 cpp_dev_headers = [s for s in ppapi_cpp_objects['sources'] |
244 # From ppapi_gl.gypi:ppapi_gles2:.*\.h | 93 if re.match('^dev/[^/]*\.h$', s)] |
245 'lib/gl/gles2/gl2ext_ppapi.h', | 94 |
246 # End ppapi_gl.gypi | 95 # From ppapi_gl.gypi:ppapi_gles2:.*\.h |
247 ] | 96 gles2_headers = [s for s in ppapi_gles2['sources'] |
97 if s.endswith('.h')] | |
98 | |
248 | 99 |
249 c_header_install = env.AddHeaderToSdk( | 100 c_header_install = env.AddHeaderToSdk( |
250 ['$SOURCE_ROOT/ppapi/' + h for h in c_headers], os.path.join('ppapi', 'c')) | 101 ['$SOURCE_ROOT/ppapi/' + h for h in c_headers], os.path.join('ppapi', 'c')) |
251 c_dev_header_install = env.AddHeaderToSdk( | 102 c_dev_header_install = env.AddHeaderToSdk( |
252 ['$SOURCE_ROOT/ppapi/' + h for h in c_dev_headers], | 103 ['$SOURCE_ROOT/ppapi/' + h for h in c_dev_headers], |
253 os.path.join('ppapi', 'c', 'dev')) | 104 os.path.join('ppapi', 'c', 'dev')) |
254 cpp_header_install = env.AddHeaderToSdk( | 105 cpp_header_install = env.AddHeaderToSdk( |
255 ['$SOURCE_ROOT/ppapi/' + h for h in cpp_headers], | 106 ['$SOURCE_ROOT/ppapi/' + h for h in cpp_headers], |
256 os.path.join('ppapi', 'cpp')) | 107 os.path.join('ppapi', 'cpp')) |
257 cpp_dev_header_install = env.AddHeaderToSdk( | 108 cpp_dev_header_install = env.AddHeaderToSdk( |
(...skipping 24 matching lines...) Expand all Loading... | |
282 ['$SOURCE_ROOT/ppapi/' + h for h in gles2_headers], | 133 ['$SOURCE_ROOT/ppapi/' + h for h in gles2_headers], |
283 os.path.join('ppapi', 'gles2')) | 134 os.path.join('ppapi', 'gles2')) |
284 env.AddLibraryToSdk(['ppapi_gles2']) | 135 env.AddLibraryToSdk(['ppapi_gles2']) |
285 env.Requires('ppapi_gles2', [ | 136 env.Requires('ppapi_gles2', [ |
286 egl_header_install, | 137 egl_header_install, |
287 gles2_header_install, | 138 gles2_header_install, |
288 khr_header_install, | 139 khr_header_install, |
289 ppapi_gles2_header_install, | 140 ppapi_gles2_header_install, |
290 ]) | 141 ]) |
291 | 142 |
OLD | NEW |