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 |
11 # of the lines between the starting marker and the ending marker with the | 11 # of the lines between the starting marker and the ending marker with the |
12 # corresponding list of files from the given gyp file. | 12 # corresponding list of files from the given gyp file. |
13 # | 13 # |
14 # The starting marker format is: | 14 # The starting marker format is: |
15 # # From GYP_FILE_NAME:TARGET:REGEXP | 15 # # From GYP_FILE_NAME:TARGET:REGEXP |
Mark Seaborn
2011/03/22 01:17:27
This comment would need to be removed.
bradn
2011/03/22 01:51:43
Done.
| |
16 # The ending marker format is: | 16 # The ending marker format is: |
17 # # End GYP_FILE_NAME | 17 # # End GYP_FILE_NAME |
18 # | 18 # |
19 # For example, if this exists in the .scons file: | 19 # For example, if this exists in the .scons file: |
20 # # From ppapi.gyp:ppapi_c:.*\.h | 20 # # From ppapi.gyp:ppapi_c:.*\.h |
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('env') | 30 Import('env') |
31 | 31 |
32 # Underlay $SOURCE_ROOT/ppapi in this directory. | 32 # Underlay $SOURCE_ROOT/ppapi in this directory. |
33 Dir('.').addRepository(Dir('#/../ppapi')) | 33 Dir('.').addRepository(Dir('#/../ppapi')) |
34 | 34 |
35 # Don't treat warnings as errors on Windows | 35 # Don't treat warnings as errors on Windows |
36 if env.Bit('windows'): | 36 if env.Bit('windows'): |
37 env.FilterOut(CCFLAGS=['/WX']) | 37 env.FilterOut(CCFLAGS=['/WX']) |
38 | 38 |
39 cpp_sources = [ | 39 # Load ppapi_cpp.gypi |
40 # Updated automatically by update-scons.py. | 40 ppapi_cpp_gypi_filename = env.File('#/../ppapi/ppapi_cpp.gypi').path |
41 # From ppapi_cpp.gypi:ppapi_cpp_objects:.*\.cc | 41 ppapi_cpp_gypi = eval(open(ppapi_cpp_gypi_filename).read()) |
Mark Seaborn
2011/03/22 01:17:27
Doing "eval(e, {})" would be cleaner than "eval(e)
bradn
2011/03/22 01:51:43
Done.
| |
42 'cpp/audio.cc', | 42 # Extract ppapi_cpp + ppapi_cpp_objects. |
43 'cpp/audio_config.cc', | 43 ppapi_cpp_objects = [t for t in ppapi_cpp_gypi['targets'] |
Mark Seaborn
2011/03/22 01:17:27
t -> target, perhaps?
Instead of x[0], maybe do G
bradn
2011/03/22 01:51:43
Migrated to something with an assert.
| |
44 'cpp/core.cc', | 44 if t['target_name'] == 'ppapi_cpp_objects'][0] |
45 'cpp/graphics_2d.cc', | 45 ppapi_cpp = [t for t in ppapi_cpp_gypi['targets'] |
46 'cpp/image_data.cc', | 46 if t['target_name'] == 'ppapi_cpp'][0] |
47 'cpp/instance.cc', | 47 # Combine the .cpp files from there. |
48 'cpp/module.cc', | 48 cpp_sources = ([s for s in ppapi_cpp_objects['sources'] |
Mark Seaborn
2011/03/22 01:17:27
s -> source_file?
bradn
2011/03/22 01:51:43
Done.
| |
49 'cpp/paint_aggregator.cc', | 49 if s.endswith('.cc')] + |
Mark Seaborn
2011/03/22 01:17:27
Indentation is odd here.
bradn
2011/03/22 01:51:43
Restructured.
| |
50 'cpp/paint_manager.cc', | 50 [s for s in ppapi_cpp['sources'] |
51 'cpp/rect.cc', | 51 if s.endswith('.cc')]) |
52 'cpp/resource.cc', | |
53 'cpp/url_loader.cc', | |
54 'cpp/url_request_info.cc', | |
55 'cpp/url_response_info.cc', | |
56 'cpp/var.cc', | |
57 'cpp/dev/buffer_dev.cc', | |
58 'cpp/dev/context_3d_dev.cc', | |
59 'cpp/dev/directory_entry_dev.cc', | |
60 'cpp/dev/directory_reader_dev.cc', | |
61 'cpp/dev/file_chooser_dev.cc', | |
62 'cpp/dev/file_io_dev.cc', | |
63 'cpp/dev/file_ref_dev.cc', | |
64 'cpp/dev/file_system_dev.cc', | |
65 'cpp/dev/find_dev.cc', | |
66 'cpp/dev/font_dev.cc', | |
67 'cpp/dev/fullscreen_dev.cc', | |
68 'cpp/dev/graphics_3d_client_dev.cc', | |
69 'cpp/dev/graphics_3d_dev.cc', | |
70 'cpp/dev/printing_dev.cc', | |
71 'cpp/dev/scrollbar_dev.cc', | |
72 'cpp/dev/selection_dev.cc', | |
73 'cpp/dev/surface_3d_dev.cc', | |
74 'cpp/dev/transport_dev.cc', | |
75 'cpp/dev/url_util_dev.cc', | |
76 'cpp/dev/video_decoder_dev.cc', | |
77 'cpp/dev/widget_client_dev.cc', | |
78 'cpp/dev/widget_dev.cc', | |
79 'cpp/dev/zoom_dev.cc', | |
80 'cpp/dev/scriptable_object_deprecated.cc', | |
81 # End ppapi_cpp.gypi | |
82 # Updated automatically by update-scons.py. | |
83 # From ppapi_cpp.gypi:ppapi_cpp:.*\.cc | |
84 'cpp/ppp_entrypoints.cc', | |
85 # End ppapi_cpp.gypi | |
86 ] | |
87 | 52 |
88 env.DualLibrary('ppapi_cpp', cpp_sources) | 53 env.DualLibrary('ppapi_cpp', cpp_sources) |
OLD | NEW |