OLD | NEW |
1 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2009 The Chromium OS Authors. 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 import os | 5 import os |
6 | 6 |
7 # Protobuffer compilation | 7 # Protobuffer compilation |
8 """ Inputs: | 8 """ Inputs: |
9 target: list of targets to compile to | 9 target: list of targets to compile to |
10 source: list of sources to compile | 10 source: list of sources to compile |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 # Fix issue with scons not passing pkg-config vars through the environment. | 73 # Fix issue with scons not passing pkg-config vars through the environment. |
74 for key in Split('PKG_CONFIG_LIBDIR PKG_CONFIG_PATH'): | 74 for key in Split('PKG_CONFIG_LIBDIR PKG_CONFIG_PATH'): |
75 if os.environ.has_key(key): | 75 if os.environ.has_key(key): |
76 env['ENV'][key] = os.environ[key] | 76 env['ENV'][key] = os.environ[key] |
77 | 77 |
78 env.ParseConfig('pkg-config --cflags --libs glib-2.0') | 78 env.ParseConfig('pkg-config --cflags --libs glib-2.0') |
79 env.ProtocolBuffer('update_metadata.pb.cc', 'update_metadata.proto') | 79 env.ProtocolBuffer('update_metadata.pb.cc', 'update_metadata.proto') |
80 | 80 |
81 if ARGUMENTS.get('debug', 0): | 81 if ARGUMENTS.get('debug', 0): |
82 env['CCFLAGS'] += ' -fprofile-arcs -ftest-coverage' | 82 env['CCFLAGS'] += ' -fprofile-arcs -ftest-coverage' |
83 env['LIBS'] += ['gcov'] | 83 env['LIBS'] += ['bz2', 'gcov'] |
84 | 84 |
85 | 85 |
86 | 86 |
87 sources = Split("""action_processor.cc | 87 sources = Split("""action_processor.cc |
| 88 bzip_extent_writer.cc |
88 decompressing_file_writer.cc | 89 decompressing_file_writer.cc |
89 delta_diff_parser.cc | 90 delta_diff_parser.cc |
90 download_action.cc | 91 download_action.cc |
| 92 extent_writer.cc |
91 filesystem_copier_action.cc | 93 filesystem_copier_action.cc |
92 filesystem_iterator.cc | 94 filesystem_iterator.cc |
93 file_writer.cc | 95 file_writer.cc |
94 gzip.cc | 96 gzip.cc |
95 libcurl_http_fetcher.cc | 97 libcurl_http_fetcher.cc |
96 omaha_hash_calculator.cc | 98 omaha_hash_calculator.cc |
97 omaha_request_prep_action.cc | 99 omaha_request_prep_action.cc |
98 omaha_response_handler_action.cc | 100 omaha_response_handler_action.cc |
99 postinstall_runner_action.cc | 101 postinstall_runner_action.cc |
100 set_bootable_flag_action.cc | 102 set_bootable_flag_action.cc |
101 subprocess.cc | 103 subprocess.cc |
102 update_check_action.cc | 104 update_check_action.cc |
103 update_metadata.pb.cc | 105 update_metadata.pb.cc |
104 utils.cc""") | 106 utils.cc""") |
105 main = ['main.cc'] | 107 main = ['main.cc'] |
106 | 108 |
107 unittest_sources = Split("""action_unittest.cc | 109 unittest_sources = Split("""action_unittest.cc |
108 action_pipe_unittest.cc | 110 action_pipe_unittest.cc |
109 action_processor_unittest.cc | 111 action_processor_unittest.cc |
| 112 bzip_extent_writer_unittest.cc |
110 decompressing_file_writer_unittest.cc | 113 decompressing_file_writer_unittest.cc |
111 delta_diff_generator_unittest.cc | 114 delta_diff_generator_unittest.cc |
112 download_action_unittest.cc | 115 download_action_unittest.cc |
| 116 extent_writer_unittest.cc |
113 file_writer_unittest.cc | 117 file_writer_unittest.cc |
114 filesystem_copier_action_unittest.cc | 118 filesystem_copier_action_unittest.cc |
115 filesystem_iterator_unittest.cc | 119 filesystem_iterator_unittest.cc |
116 gzip_unittest.cc | 120 gzip_unittest.cc |
117 http_fetcher_unittest.cc | 121 http_fetcher_unittest.cc |
118 mock_http_fetcher.cc | 122 mock_http_fetcher.cc |
119 omaha_hash_calculator_unittest.cc | 123 omaha_hash_calculator_unittest.cc |
120 omaha_request_prep_action_unittest.cc | 124 omaha_request_prep_action_unittest.cc |
121 omaha_response_handler_action_unittest.cc | 125 omaha_response_handler_action_unittest.cc |
122 postinstall_runner_action_unittest.cc | 126 postinstall_runner_action_unittest.cc |
(...skipping 19 matching lines...) Expand all Loading... |
142 unittest_sources + test_installer_main) | 146 unittest_sources + test_installer_main) |
143 | 147 |
144 Clean(unittest_cmd, Glob('*.gcda') + Glob('*.gcno') + Glob('*.gcov') + | 148 Clean(unittest_cmd, Glob('*.gcda') + Glob('*.gcno') + Glob('*.gcov') + |
145 Split('html app.info')) | 149 Split('html app.info')) |
146 | 150 |
147 delta_generator_cmd = env.Program('delta_generator', | 151 delta_generator_cmd = env.Program('delta_generator', |
148 sources + delta_generator_sources + | 152 sources + delta_generator_sources + |
149 delta_generator_main) | 153 delta_generator_main) |
150 | 154 |
151 http_server_cmd = env.Program('test_http_server', 'test_http_server.cc') | 155 http_server_cmd = env.Program('test_http_server', 'test_http_server.cc') |
OLD | NEW |