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 def ProtocolBufferEmitter(target, source, env): | 8 def ProtocolBufferEmitter(target, source, env): |
9 """ Inputs: | 9 """ Inputs: |
10 target: list of targets to compile to | 10 target: list of targets to compile to |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 env['LIBPATH'] = ['../../third_party/chrome'] | 171 env['LIBPATH'] = ['../../third_party/chrome'] |
172 env['BUILDERS']['ProtocolBuffer'] = proto_builder | 172 env['BUILDERS']['ProtocolBuffer'] = proto_builder |
173 env['BUILDERS']['DbusBindings'] = dbus_bindings_builder | 173 env['BUILDERS']['DbusBindings'] = dbus_bindings_builder |
174 env['BUILDERS']['GlibMarshal'] = glib_marshal_builder | 174 env['BUILDERS']['GlibMarshal'] = glib_marshal_builder |
175 | 175 |
176 # Hack to fix dependencies from auto generated headers. | 176 # Hack to fix dependencies from auto generated headers. |
177 # Some files indirectly included update_metatadata.pb.h | 177 # Some files indirectly included update_metatadata.pb.h |
178 # which is built as a side effect of building update_metadata.pb.cc | 178 # which is built as a side effect of building update_metadata.pb.cc |
179 env.Depends('bzip_extent_writer_unittest.cc', 'update_metadata.pb.cc'); | 179 env.Depends('bzip_extent_writer_unittest.cc', 'update_metadata.pb.cc'); |
180 env.Depends('bzip_extent_writer.cc', 'update_metadata.pb.cc'); | 180 env.Depends('bzip_extent_writer.cc', 'update_metadata.pb.cc'); |
| 181 env.Depends('cycle_breaker.cc', 'update_metadata.pb.cc'); |
181 | 182 |
182 # Some files indirectly include marshal.glibmarshal.h | 183 # Some files indirectly include marshal.glibmarshal.h |
183 # which is built as a side effect of the .c file | 184 # which is built as a side effect of the .c file |
184 env.Depends('dbus_service.cc', 'marshal.glibmarshal.c'); | 185 env.Depends('dbus_service.cc', 'marshal.glibmarshal.c'); |
185 | 186 |
186 # Some files indirectly include update_engine.dbusserver.h | 187 # Some files indirectly include update_engine.dbusserver.h |
187 # which is built as a side effect of the dbusclient.h file | 188 # which is built as a side effect of the dbusclient.h file |
188 env.Depends('mock_http_fetcher.cc', 'update_engine.dbusclient.h'); | 189 env.Depends('mock_http_fetcher.cc', 'update_engine.dbusclient.h'); |
189 env.Depends('main.cc', 'update_engine.dbusserver.h'); | 190 env.Depends('main.cc', 'update_engine.dbusclient.h'); |
190 | 191 |
191 # Fix issue with scons not passing pkg-config vars through the environment. | 192 # Fix issue with scons not passing pkg-config vars through the environment. |
192 for key in Split('PKG_CONFIG_LIBDIR PKG_CONFIG_PATH'): | 193 for key in Split('PKG_CONFIG_LIBDIR PKG_CONFIG_PATH'): |
193 if os.environ.has_key(key): | 194 if os.environ.has_key(key): |
194 env['ENV'][key] = os.environ[key] | 195 env['ENV'][key] = os.environ[key] |
195 | 196 |
196 env.ParseConfig('pkg-config --cflags --libs ' | 197 env.ParseConfig('pkg-config --cflags --libs ' |
197 'dbus-1 dbus-glib-1 gio-2.0 gio-unix-2.0 glib-2.0') | 198 'dbus-1 dbus-glib-1 gio-2.0 gio-unix-2.0 glib-2.0') |
198 env.ProtocolBuffer('update_metadata.pb.cc', 'update_metadata.proto') | 199 env.ProtocolBuffer('update_metadata.pb.cc', 'update_metadata.proto') |
199 | 200 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 delta_generator_main) | 289 delta_generator_main) |
289 | 290 |
290 http_server_cmd = env.Program('test_http_server', 'test_http_server.cc') | 291 http_server_cmd = env.Program('test_http_server', 'test_http_server.cc') |
291 | 292 |
292 unittest_env = env.Clone() | 293 unittest_env = env.Clone() |
293 unittest_env.Append(LIBS=['gtest']) | 294 unittest_env.Append(LIBS=['gtest']) |
294 unittest_cmd = unittest_env.Program('update_engine_unittests', | 295 unittest_cmd = unittest_env.Program('update_engine_unittests', |
295 unittest_sources + unittest_main) | 296 unittest_sources + unittest_main) |
296 Clean(unittest_cmd, Glob('*.gcda') + Glob('*.gcno') + Glob('*.gcov') + | 297 Clean(unittest_cmd, Glob('*.gcda') + Glob('*.gcno') + Glob('*.gcov') + |
297 Split('html app.info')) | 298 Split('html app.info')) |
OLD | NEW |