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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 pthread | 166 pthread |
167 ssl | 167 ssl |
168 xml2 | 168 xml2 |
169 z""") | 169 z""") |
170 env['CPPPATH'] = ['..', '../../third_party/chrome/files', '../../common'] | 170 env['CPPPATH'] = ['..', '../../third_party/chrome/files', '../../common'] |
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. |
| 177 # Some files indirectly included update_metatadata.pb.h |
| 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'); |
| 180 env.Depends('bzip_extent_writer.cc', 'update_metadata.pb.cc'); |
| 181 |
| 182 # Some files indirectly include marshal.glibmarshal.h |
| 183 # which is built as a side effect of the .c file |
| 184 env.Depends('dbus_service.cc', 'marshal.glibmarshal.c'); |
| 185 |
| 186 # Some files indirectly include update_engine.dbusserver.h |
| 187 # which is built as a side effect of the dbusclient.h file |
| 188 env.Depends('mock_http_fetcher.cc', 'update_engine.dbusclient.h'); |
| 189 |
176 # Fix issue with scons not passing pkg-config vars through the environment. | 190 # Fix issue with scons not passing pkg-config vars through the environment. |
177 for key in Split('PKG_CONFIG_LIBDIR PKG_CONFIG_PATH'): | 191 for key in Split('PKG_CONFIG_LIBDIR PKG_CONFIG_PATH'): |
178 if os.environ.has_key(key): | 192 if os.environ.has_key(key): |
179 env['ENV'][key] = os.environ[key] | 193 env['ENV'][key] = os.environ[key] |
180 | 194 |
181 env.ParseConfig('pkg-config --cflags --libs ' | 195 env.ParseConfig('pkg-config --cflags --libs ' |
182 'dbus-1 dbus-glib-1 gio-2.0 gio-unix-2.0 glib-2.0') | 196 'dbus-1 dbus-glib-1 gio-2.0 gio-unix-2.0 glib-2.0') |
183 env.ProtocolBuffer('update_metadata.pb.cc', 'update_metadata.proto') | 197 env.ProtocolBuffer('update_metadata.pb.cc', 'update_metadata.proto') |
184 | 198 |
185 env.DbusBindings('update_engine.dbusclient.h', 'update_engine.xml') | 199 env.DbusBindings('update_engine.dbusclient.h', 'update_engine.xml') |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 delta_generator_main) | 287 delta_generator_main) |
274 | 288 |
275 http_server_cmd = env.Program('test_http_server', 'test_http_server.cc') | 289 http_server_cmd = env.Program('test_http_server', 'test_http_server.cc') |
276 | 290 |
277 unittest_env = env.Clone() | 291 unittest_env = env.Clone() |
278 unittest_env.Append(LIBS=['gtest']) | 292 unittest_env.Append(LIBS=['gtest']) |
279 unittest_cmd = unittest_env.Program('update_engine_unittests', | 293 unittest_cmd = unittest_env.Program('update_engine_unittests', |
280 unittest_sources + unittest_main) | 294 unittest_sources + unittest_main) |
281 Clean(unittest_cmd, Glob('*.gcda') + Glob('*.gcno') + Glob('*.gcov') + | 295 Clean(unittest_cmd, Glob('*.gcda') + Glob('*.gcno') + Glob('*.gcov') + |
282 Split('html app.info')) | 296 Split('html app.info')) |
OLD | NEW |