Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: sync/sync.gyp

Issue 11412211: [sync] Componentize sync: Part Final: Target 'sync' is now its own component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + Merge + Undo copyright changes Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/protocol/sync_proto.gyp ('k') | sync/sync_api.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium 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 { 5 {
6 'variables': { 6 'variables': {
7 'chromium_code': 1, 7 'chromium_code': 1,
8 }, 8 },
9 'targets': [ 9
10 # The core sync library. 10 'includes': [
11 { 11 'sync_tests.gypi',
12 'target_name': 'sync_core', 12 ],
13 'type': 'static_library', 13
14 'variables': { 'enable_wexit_time_destructors': 1, }, 14 'conditions': [
15 'include_dirs': [ 15 # Notes:
16 '..', 16 # 1) In static mode, the public 'sync' target has a target type of 'none',
17 ], 17 # and is composed of the static library targets 'sync_api', 'sync_core',
18 'defines': [ 18 # 'sync_internal_api', 'sync_notifier', and 'sync_proto'.
19 'SYNC_IMPLEMENTATION', 19 # 2) In component mode, we build the public 'sync' target into a single DLL,
20 ], 20 # which includes the contents of sync_api.gypi, sync_core.gypi,
21 'dependencies': [ 21 # sync_internal_api.gypi, sync_notifier.gypi, and sync_proto.gypi.
22 '../base/base.gyp:base', 22 # 3) All external targets that depend on anything in sync/ must simply
23 '../build/temp_gyp/googleurl.gyp:googleurl', 23 # declare a dependency on 'sync.gyp:sync'
24 '../crypto/crypto.gyp:crypto', 24 ['component=="static_library"', {
25 '../google_apis/google_apis.gyp:google_apis', 25 'targets': [
26 '../net/net.gyp:net', 26 # The public sync static library target.
27 '../sql/sql.gyp:sql', 27 {
28 'protocol/sync_proto.gyp:sync_proto', 28 'target_name': 'sync',
29 ], 29 'type': 'none',
30 'conditions': [
31 ['OS=="linux" and chromeos==1', {
32 # Required by get_session_name.cc on Chrome OS.
33 'dependencies': [ 30 'dependencies': [
34 '../chromeos/chromeos.gyp:chromeos', 31 'sync_api',
35 ], 32 'sync_core',
36 }], 33 'sync_internal_api',
37 ],
38 'export_dependent_settings': [
39 # Propagate sync_proto since our headers include its generated
40 # files.
41 'protocol/sync_proto.gyp:sync_proto',
42 ],
43 'sources': [
44 'base/sync_export.h',
45 'engine/all_status.cc',
46 'engine/all_status.h',
47 'engine/apply_control_data_updates.cc',
48 'engine/apply_control_data_updates.h',
49 'engine/apply_updates_and_resolve_conflicts_command.cc',
50 'engine/apply_updates_and_resolve_conflicts_command.h',
51 'engine/backoff_delay_provider.cc',
52 'engine/backoff_delay_provider.h',
53 'engine/build_commit_command.cc',
54 'engine/build_commit_command.h',
55 'engine/commit.cc',
56 'engine/commit.h',
57 'engine/conflict_resolver.cc',
58 'engine/conflict_resolver.h',
59 'engine/conflict_util.cc',
60 'engine/conflict_util.h',
61 'engine/download_updates_command.cc',
62 'engine/download_updates_command.h',
63 'engine/get_commit_ids_command.cc',
64 'engine/get_commit_ids_command.h',
65 'engine/model_changing_syncer_command.cc',
66 'engine/model_changing_syncer_command.h',
67 'engine/net/server_connection_manager.cc',
68 'engine/net/server_connection_manager.h',
69 'engine/net/url_translator.cc',
70 'engine/net/url_translator.h',
71 'engine/nudge_source.cc',
72 'engine/nudge_source.h',
73 'engine/process_commit_response_command.cc',
74 'engine/process_commit_response_command.h',
75 'engine/process_updates_command.cc',
76 'engine/process_updates_command.h',
77 'engine/store_timestamps_command.cc',
78 'engine/store_timestamps_command.h',
79 'engine/sync_engine_event.cc',
80 'engine/sync_engine_event.h',
81 'engine/sync_scheduler.cc',
82 'engine/sync_scheduler.h',
83 'engine/sync_scheduler_impl.cc',
84 'engine/sync_scheduler_impl.h',
85 'engine/sync_session_job.cc',
86 'engine/sync_session_job.h',
87 'engine/syncer.cc',
88 'engine/syncer.h',
89 'engine/syncer_command.cc',
90 'engine/syncer_command.h',
91 'engine/syncer_proto_util.cc',
92 'engine/syncer_proto_util.h',
93 'engine/syncer_types.h',
94 'engine/syncer_util.cc',
95 'engine/syncer_util.h',
96 'engine/throttled_data_type_tracker.cc',
97 'engine/throttled_data_type_tracker.h',
98 'engine/traffic_logger.cc',
99 'engine/traffic_logger.h',
100 'engine/traffic_recorder.cc',
101 'engine/traffic_recorder.h',
102 'engine/update_applicator.cc',
103 'engine/update_applicator.h',
104 'js/js_arg_list.cc',
105 'js/js_arg_list.h',
106 'js/js_backend.h',
107 'js/js_controller.h',
108 'js/js_event_details.cc',
109 'js/js_event_details.h',
110 'js/js_event_handler.h',
111 'js/js_reply_handler.h',
112 'js/sync_js_controller.cc',
113 'js/sync_js_controller.h',
114 'protocol/proto_enum_conversions.cc',
115 'protocol/proto_enum_conversions.h',
116 'protocol/proto_value_conversions.cc',
117 'protocol/proto_value_conversions.h',
118 'protocol/sync_protocol_error.cc',
119 'protocol/sync_protocol_error.h',
120 'sessions/debug_info_getter.h',
121 'sessions/ordered_commit_set.cc',
122 'sessions/ordered_commit_set.h',
123 'sessions/status_controller.cc',
124 'sessions/status_controller.h',
125 'sessions/sync_session.cc',
126 'sessions/sync_session.h',
127 'sessions/sync_session_context.cc',
128 'sessions/sync_session_context.h',
129 'syncable/blob.h',
130 'syncable/dir_open_result.h',
131 'syncable/directory.cc',
132 'syncable/directory.h',
133 'syncable/directory_backing_store.cc',
134 'syncable/directory_backing_store.h',
135 'syncable/directory_change_delegate.h',
136 'syncable/entry.cc',
137 'syncable/entry.h',
138 'syncable/entry_kernel.cc',
139 'syncable/entry_kernel.h',
140 'syncable/in_memory_directory_backing_store.cc',
141 'syncable/in_memory_directory_backing_store.h',
142 'syncable/invalid_directory_backing_store.cc',
143 'syncable/invalid_directory_backing_store.h',
144 'syncable/metahandle_set.h',
145 'syncable/model_type.cc',
146 'syncable/mutable_entry.cc',
147 'syncable/mutable_entry.h',
148 'syncable/nigori_handler.cc',
149 'syncable/nigori_handler.h',
150 'syncable/nigori_util.cc',
151 'syncable/nigori_util.h',
152 'syncable/on_disk_directory_backing_store.cc',
153 'syncable/on_disk_directory_backing_store.h',
154 'syncable/scoped_kernel_lock.h',
155 'syncable/syncable-inl.h',
156 'syncable/syncable_base_transaction.cc',
157 'syncable/syncable_base_transaction.h',
158 'syncable/syncable_changes_version.h',
159 'syncable/syncable_columns.h',
160 'syncable/syncable_delete_journal.cc',
161 'syncable/syncable_delete_journal.h',
162 'syncable/syncable_enum_conversions.cc',
163 'syncable/syncable_enum_conversions.h',
164 'syncable/syncable_id.cc',
165 'syncable/syncable_id.h',
166 'syncable/syncable_proto_util.cc',
167 'syncable/syncable_proto_util.h',
168 'syncable/syncable_read_transaction.cc',
169 'syncable/syncable_read_transaction.h',
170 'syncable/syncable_util.cc',
171 'syncable/syncable_util.h',
172 'syncable/syncable_write_transaction.cc',
173 'syncable/syncable_write_transaction.h',
174 'syncable/transaction_observer.h',
175 'syncable/write_transaction_info.cc',
176 'syncable/write_transaction_info.h',
177 'util/cryptographer.cc',
178 'util/cryptographer.h',
179
180 # TODO(akalin): Figure out a better place to put
181 # data_encryption_win*; it's also used by autofill.
182 'util/data_encryption_win.cc',
183 'util/data_encryption_win.h',
184
185 'util/data_type_histogram.h',
186 'util/encryptor.h',
187 'util/extensions_activity_monitor.cc',
188 'util/extensions_activity_monitor.h',
189 'util/get_session_name.cc',
190 'util/get_session_name.h',
191 'util/get_session_name_ios.mm',
192 'util/get_session_name_ios.h',
193 'util/get_session_name_mac.mm',
194 'util/get_session_name_mac.h',
195 'util/get_session_name_win.cc',
196 'util/get_session_name_win.h',
197 'util/logging.cc',
198 'util/logging.h',
199 'util/nigori.cc',
200 'util/nigori.h',
201 'util/time.cc',
202 'util/time.h',
203 ],
204 },
205
206 # The sync notifications library.
207 {
208 'target_name': 'sync_notifier',
209 'type': 'static_library',
210 'variables': { 'enable_wexit_time_destructors': 1, },
211 'include_dirs': [
212 '..',
213 ],
214 'dependencies': [
215 '../base/base.gyp:base',
216 '../jingle/jingle.gyp:jingle_glue',
217 '../jingle/jingle.gyp:notifier',
218 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidatio n',
219 # TODO(akalin): Remove this (http://crbug.com/133352).
220 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidatio n_proto_cpp',
221 '../third_party/libjingle/libjingle.gyp:libjingle',
222 'sync_core',
223 ],
224 'export_dependent_settings': [
225 '../jingle/jingle.gyp:notifier',
226 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidatio n',
227 ],
228 'sources': [
229 'notifier/invalidation_handler.h',
230 'notifier/invalidation_state_tracker.cc',
231 'notifier/invalidation_state_tracker.h',
232 'notifier/invalidation_util.cc',
233 'notifier/invalidation_util.h',
234 'notifier/invalidator_factory.cc',
235 'notifier/invalidator_factory.h',
236 'notifier/invalidator.h',
237 'notifier/invalidator_registrar.cc',
238 'notifier/invalidator_registrar.h',
239 'notifier/invalidator_state.cc',
240 'notifier/invalidator_state.h',
241 'notifier/object_id_invalidation_map.cc',
242 'notifier/object_id_invalidation_map.h',
243 ],
244 'conditions': [
245 ['OS != "android"', {
246 'sources': [
247 'notifier/ack_tracker.cc',
248 'notifier/ack_tracker.h',
249 'notifier/invalidation_notifier.cc',
250 'notifier/invalidation_notifier.h',
251 'notifier/non_blocking_invalidator.cc',
252 'notifier/non_blocking_invalidator.h',
253 'notifier/p2p_invalidator.cc',
254 'notifier/p2p_invalidator.h',
255 'notifier/push_client_channel.cc',
256 'notifier/push_client_channel.h',
257 'notifier/registration_manager.cc',
258 'notifier/registration_manager.h',
259 'notifier/state_writer.h',
260 'notifier/sync_invalidation_listener.cc',
261 'notifier/sync_invalidation_listener.h',
262 'notifier/sync_system_resources.cc',
263 'notifier/sync_system_resources.h',
264 ],
265 }],
266 ],
267 },
268 # The sync internal API library.
269 {
270 'target_name': 'sync_internal_api',
271 'type': 'static_library',
272 'variables': { 'enable_wexit_time_destructors': 1, },
273 'include_dirs': [
274 '..',
275 ],
276 'dependencies': [
277 '../base/base.gyp:base',
278 '../build/temp_gyp/googleurl.gyp:googleurl',
279 '../net/net.gyp:net',
280 'protocol/sync_proto.gyp:sync_proto',
281 'sync_core',
282 'sync_notifier',
283 ],
284 'export_dependent_settings': [
285 # Propagate sync_proto since our headers include its generated
286 # files.
287 'protocol/sync_proto.gyp:sync_proto',
288 'sync_core',
289 ],
290 'sources': [
291 'internal_api/base_node.cc',
292 'internal_api/base_transaction.cc',
293 'internal_api/change_record.cc',
294 'internal_api/change_reorder_buffer.cc',
295 'internal_api/change_reorder_buffer.h',
296 'internal_api/debug_info_event_listener.cc',
297 'internal_api/debug_info_event_listener.h',
298 'internal_api/http_bridge.cc',
299 'internal_api/internal_components_factory_impl.cc',
300 'internal_api/js_mutation_event_observer.cc',
301 'internal_api/js_mutation_event_observer.h',
302 'internal_api/js_sync_encryption_handler_observer.cc',
303 'internal_api/js_sync_encryption_handler_observer.h',
304 'internal_api/js_sync_manager_observer.cc',
305 'internal_api/js_sync_manager_observer.h',
306 'internal_api/public/base/enum_set.h',
307 'internal_api/public/base/invalidation.cc',
308 'internal_api/public/base/invalidation.h',
309 'internal_api/public/base/model_type.h',
310 'internal_api/public/base/model_type_invalidation_map.cc',
311 'internal_api/public/base/model_type_invalidation_map.h',
312 'internal_api/public/base/node_ordinal.cc',
313 'internal_api/public/base/node_ordinal.h',
314 'internal_api/public/base/ordinal.h',
315 'internal_api/public/base/progress_marker_map.cc',
316 'internal_api/public/base/progress_marker_map.h',
317 'internal_api/public/base/unique_position.cc',
318 'internal_api/public/base/unique_position.h',
319 'internal_api/public/base_node.h',
320 'internal_api/public/base_transaction.h',
321 'internal_api/public/change_record.h',
322 'internal_api/public/configure_reason.h',
323 'internal_api/public/data_type_association_stats.cc',
324 'internal_api/public/data_type_association_stats.h',
325 'internal_api/public/data_type_debug_info_listener.h',
326 'internal_api/public/engine/model_safe_worker.cc',
327 'internal_api/public/engine/model_safe_worker.h',
328 'internal_api/public/engine/passive_model_worker.cc',
329 'internal_api/public/engine/passive_model_worker.h',
330 'internal_api/public/engine/polling_constants.cc',
331 'internal_api/public/engine/polling_constants.h',
332 'internal_api/public/engine/sync_status.cc',
333 'internal_api/public/engine/sync_status.h',
334 'internal_api/public/http_bridge.h',
335 'internal_api/public/http_post_provider_factory.h',
336 'internal_api/public/http_post_provider_interface.h',
337 'internal_api/public/internal_components_factory_impl.h',
338 'internal_api/public/internal_components_factory.h',
339 'internal_api/public/delete_journal.h',
340 'internal_api/public/read_node.h',
341 'internal_api/public/read_transaction.h',
342 'internal_api/public/sessions/model_neutral_state.cc',
343 'internal_api/public/sessions/model_neutral_state.h',
344 'internal_api/public/sessions/sync_session_snapshot.cc',
345 'internal_api/public/sessions/sync_session_snapshot.h',
346 'internal_api/public/sessions/sync_source_info.cc',
347 'internal_api/public/sessions/sync_source_info.h',
348 'internal_api/public/sync_encryption_handler.cc',
349 'internal_api/public/sync_encryption_handler.h',
350 'internal_api/public/sync_manager_factory.h',
351 'internal_api/public/sync_manager.cc',
352 'internal_api/public/sync_manager.h',
353 'internal_api/public/user_share.h',
354 'internal_api/public/util/experiments.h',
355 'internal_api/public/util/immutable.h',
356 'internal_api/public/util/report_unrecoverable_error_function.h',
357 'internal_api/public/util/sync_string_conversions.cc',
358 'internal_api/public/util/sync_string_conversions.h',
359 'internal_api/public/util/syncer_error.cc',
360 'internal_api/public/util/syncer_error.h',
361 'internal_api/public/util/unrecoverable_error_handler.h',
362 'internal_api/public/util/unrecoverable_error_info.cc',
363 'internal_api/public/util/unrecoverable_error_info.h',
364 'internal_api/public/util/weak_handle.cc',
365 'internal_api/public/util/weak_handle.h',
366 'internal_api/public/write_node.h',
367 'internal_api/public/write_transaction.h',
368 'internal_api/delete_journal.cc',
369 'internal_api/read_node.cc',
370 'internal_api/read_transaction.cc',
371 'internal_api/sync_encryption_handler_impl.cc',
372 'internal_api/sync_encryption_handler_impl.h',
373 'internal_api/sync_manager_factory.cc',
374 'internal_api/sync_manager_impl.cc',
375 'internal_api/sync_manager_impl.h',
376 'internal_api/syncapi_internal.cc',
377 'internal_api/syncapi_internal.h',
378 'internal_api/syncapi_server_connection_manager.cc',
379 'internal_api/syncapi_server_connection_manager.h',
380 'internal_api/user_share.cc',
381 'internal_api/write_node.cc',
382 'internal_api/write_transaction.cc',
383 ],
384 },
385
386 # The sync external API library.
387 {
388 'target_name': 'sync_api',
389 'type': 'static_library',
390 'variables': { 'enable_wexit_time_destructors': 1, },
391 'include_dirs': [
392 '..',
393 ],
394 'dependencies': [
395 '../base/base.gyp:base',
396 'protocol/sync_proto.gyp:sync_proto',
397 'sync_internal_api',
398 ],
399 # We avoid including header files from sync_proto in our public
400 # header files so we don't need to export its settings.
401 'sources': [
402 'api/string_ordinal.h',
403 'api/syncable_service.cc',
404 'api/syncable_service.h',
405 'api/sync_data.h',
406 'api/sync_data.cc',
407 'api/sync_change.h',
408 'api/sync_change.cc',
409 'api/sync_change_processor.h',
410 'api/sync_change_processor.cc',
411 'api/sync_error.h',
412 'api/sync_error.cc',
413 'api/sync_error_factory.h',
414 'api/sync_error_factory.cc',
415 'api/sync_merge_result.h',
416 'api/sync_merge_result.cc',
417 'api/time.h',
418 ],
419 },
420
421 # The componentized sync library.
422 {
423 'target_name': 'sync_component',
424 # TODO(rsimha): Change the type of this target to '<(component)' after
425 # exporting dependencies on 'sync_proto'.
426 'type': 'none',
427 'dependencies': [
428 'sync_api',
429 'sync_core',
430 'sync_notifier',
431 'sync_internal_api',
432 ],
433 'export_dependent_settings': [
434 'sync_api',
435 'sync_core',
436 'sync_notifier',
437 'sync_internal_api',
438 ],
439 },
440
441 # The public sync target. This depends on 'sync_component' and
442 # 'sync_proto' separately since 'sync_proto' isn't exportable from
443 # 'sync_component' (for now).
444 {
445 'target_name': 'sync',
446 'type': 'none',
447 'dependencies': [
448 'sync_component',
449 'protocol/sync_proto.gyp:sync_proto',
450 ],
451 'export_dependent_settings': [
452 'sync_component',
453 'protocol/sync_proto.gyp:sync_proto',
454 ],
455 },
456
457 # Test support files for the 'sync_core' target.
458 {
459 'target_name': 'test_support_sync_core',
460 'type': 'static_library',
461 'variables': { 'enable_wexit_time_destructors': 1, },
462 'include_dirs': [
463 '..',
464 ],
465 'dependencies': [
466 '../base/base.gyp:base',
467 '../testing/gmock.gyp:gmock',
468 '../testing/gtest.gyp:gtest',
469 'protocol/sync_proto.gyp:sync_proto',
470 'sync_core',
471 ],
472 'export_dependent_settings': [
473 '../testing/gmock.gyp:gmock',
474 '../testing/gtest.gyp:gtest',
475 'protocol/sync_proto.gyp:sync_proto',
476 'sync_core',
477 ],
478 'sources': [
479 'js/js_test_util.cc',
480 'js/js_test_util.h',
481 'sessions/test_util.cc',
482 'sessions/test_util.h',
483 'syncable/syncable_mock.cc',
484 'syncable/syncable_mock.h',
485 'test/callback_counter.h',
486 'test/engine/fake_model_worker.cc',
487 'test/engine/fake_model_worker.h',
488 'test/engine/fake_sync_scheduler.cc',
489 'test/engine/fake_sync_scheduler.h',
490 'test/engine/mock_connection_manager.cc',
491 'test/engine/mock_connection_manager.h',
492 'test/engine/syncer_command_test.cc',
493 'test/engine/syncer_command_test.h',
494 'test/engine/test_directory_setter_upper.cc',
495 'test/engine/test_directory_setter_upper.h',
496 'test/engine/test_id_factory.h',
497 'test/engine/test_syncable_utils.cc',
498 'test/engine/test_syncable_utils.h',
499 'test/fake_encryptor.cc',
500 'test/fake_encryptor.h',
501 'test/fake_sync_encryption_handler.h',
502 'test/fake_sync_encryption_handler.cc',
503 'test/fake_extensions_activity_monitor.cc',
504 'test/fake_extensions_activity_monitor.h',
505 'test/test_transaction_observer.cc',
506 'test/test_transaction_observer.h',
507 'test/null_directory_change_delegate.cc',
508 'test/null_directory_change_delegate.h',
509 'test/null_transaction_observer.cc',
510 'test/null_transaction_observer.h',
511 'test/sessions/test_scoped_session_event_listener.h',
512 'test/test_directory_backing_store.cc',
513 'test/test_directory_backing_store.h',
514 'util/test_unrecoverable_error_handler.cc',
515 'util/test_unrecoverable_error_handler.h',
516 ],
517 },
518
519 # Test support files for the python sync test server.
520 {
521 'target_name': 'test_support_sync_testserver',
522 'type': 'static_library',
523 'variables': { 'enable_wexit_time_destructors': 1, },
524 'include_dirs': [
525 '..',
526 ],
527 'dependencies': [
528 '../base/base.gyp:base',
529 '../net/net.gyp:net_test_support',
530
531 # The sync test server uses Python modules generated by the sync protos.
532 '../third_party/protobuf/protobuf.gyp:py_proto',
533 'protocol/sync_proto.gyp:sync_proto',
534 ],
535 'export_dependent_settings': [
536 '../base/base.gyp:base',
537 '../net/net.gyp:net_test_support',
538 ],
539 'sources': [
540 'test/local_sync_test_server.cc',
541 'test/local_sync_test_server.h',
542 ],
543 },
544
545 # Test support files for the 'sync_notifier' target.
546 {
547 'target_name': 'test_support_sync_notifier',
548 'type': 'static_library',
549 'include_dirs': [
550 '..',
551 ],
552 'dependencies': [
553 '../testing/gmock.gyp:gmock',
554 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidatio n_proto_cpp',
555 'sync_internal_api',
556 'sync_notifier',
557 ],
558 'export_dependent_settings': [
559 '../testing/gmock.gyp:gmock',
560 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidatio n_proto_cpp',
561 'sync_internal_api',
562 'sync_notifier',
563 ],
564 'sources': [
565 'notifier/fake_invalidation_state_tracker.cc',
566 'notifier/fake_invalidation_state_tracker.h',
567 'notifier/fake_invalidator.cc',
568 'notifier/fake_invalidator.h',
569 'notifier/fake_invalidation_handler.cc',
570 'notifier/fake_invalidation_handler.h',
571 'notifier/invalidator_test_template.cc',
572 'notifier/invalidator_test_template.h',
573 'notifier/object_id_invalidation_map_test_util.cc',
574 'notifier/object_id_invalidation_map_test_util.h',
575 ],
576 },
577
578 # Test support files for the 'sync_internal_api' target.
579 {
580 'target_name': 'test_support_sync_internal_api',
581 'type': 'static_library',
582 'variables': { 'enable_wexit_time_destructors': 1, },
583 'include_dirs': [
584 '..',
585 ],
586 'dependencies': [
587 '../base/base.gyp:base',
588 '../testing/gtest.gyp:gtest',
589 'protocol/sync_proto.gyp:sync_proto',
590 'sync_core',
591 'sync_internal_api',
592 'sync_notifier',
593 'test_support_sync_core',
594 ],
595 'export_dependent_settings': [
596 '../testing/gtest.gyp:gtest',
597 'protocol/sync_proto.gyp:sync_proto',
598 'sync_core',
599 'sync_internal_api',
600 'sync_notifier',
601 'test_support_sync_core',
602 ],
603 'sources': [
604 'internal_api/public/base/invalidation_test_util.cc',
605 'internal_api/public/base/invalidation_test_util.h',
606 'internal_api/public/base/model_type_invalidation_map_test_util.cc',
607 'internal_api/public/base/model_type_invalidation_map_test_util.h',
608 'internal_api/public/base/model_type_test_util.cc',
609 'internal_api/public/base/model_type_test_util.h',
610 'internal_api/public/test/fake_sync_manager.h',
611 'internal_api/public/test/test_entry_factory.h',
612 'internal_api/public/test/test_internal_components_factory.h',
613 'internal_api/public/test/test_user_share.h',
614 'internal_api/test/fake_sync_manager.cc',
615 'internal_api/test/test_entry_factory.cc',
616 'internal_api/test/test_internal_components_factory.cc',
617 'internal_api/test/test_user_share.cc',
618 ],
619 },
620
621 # Test support files for the 'sync_api' target.
622 {
623 'target_name': 'test_support_sync_api',
624 'type': 'static_library',
625 'include_dirs': [
626 '..',
627 ],
628 'dependencies': [
629 '../testing/gmock.gyp:gmock',
630 'sync_api',
631 ],
632 'export_dependent_settings': [
633 '../testing/gmock.gyp:gmock',
634 'sync_api',
635 ],
636 'sources': [
637 'api/fake_syncable_service.cc',
638 'api/fake_syncable_service.h',
639 'api/sync_error_factory_mock.cc',
640 'api/sync_error_factory_mock.h',
641 ],
642 },
643
644 # Unit tests for the 'sync_core' target. This cannot be a static
645 # library because the unit test files have to be compiled directly
646 # into the executable, so we push the target files to the
647 # depending executable target via direct_dependent_settings.
648 {
649 'target_name': 'sync_core_tests',
650 'type': 'none',
651 # We only want unit test executables to include this target.
652 'suppress_wildcard': 1,
653 'dependencies': [
654 '../base/base.gyp:base',
655 '../testing/gmock.gyp:gmock',
656 '../testing/gtest.gyp:gtest',
657 'protocol/sync_proto.gyp:sync_proto',
658 'sync_core',
659 'test_support_sync_core',
660 ],
661 # Propagate all dependencies since the actual compilation
662 # happens in the dependents.
663 'export_dependent_settings': [
664 '../base/base.gyp:base',
665 '../testing/gmock.gyp:gmock',
666 '../testing/gtest.gyp:gtest',
667 'protocol/sync_proto.gyp:sync_proto',
668 'sync_core',
669 'test_support_sync_core',
670 ],
671 'direct_dependent_settings': {
672 'include_dirs': [
673 '..',
674 ],
675 'sources': [
676 'internal_api/public/base/enum_set_unittest.cc',
677 'internal_api/public/base/model_type_invalidation_map_unittest.cc',
678 'internal_api/public/base/node_ordinal_unittest.cc',
679 'internal_api/public/base/ordinal_unittest.cc',
680 'internal_api/public/base/unique_position_unittest.cc',
681 'internal_api/public/engine/model_safe_worker_unittest.cc',
682 'internal_api/public/util/immutable_unittest.cc',
683 'internal_api/public/util/weak_handle_unittest.cc',
684 'engine/apply_control_data_updates_unittest.cc',
685 'engine/apply_updates_and_resolve_conflicts_command_unittest.cc',
686 'engine/backoff_delay_provider_unittest.cc',
687 'engine/build_commit_command_unittest.cc',
688 'engine/download_updates_command_unittest.cc',
689 'engine/model_changing_syncer_command_unittest.cc',
690 'engine/process_commit_response_command_unittest.cc',
691 'engine/process_updates_command_unittest.cc',
692 'engine/store_timestamps_command_unittest.cc',
693 'engine/sync_session_job_unittest.cc',
694 'engine/sync_scheduler_unittest.cc',
695 'engine/sync_scheduler_whitebox_unittest.cc',
696 'engine/syncer_proto_util_unittest.cc',
697 'engine/syncer_unittest.cc',
698 'engine/throttled_data_type_tracker_unittest.cc',
699 'engine/traffic_recorder_unittest.cc',
700 'js/js_arg_list_unittest.cc',
701 'js/js_event_details_unittest.cc',
702 'js/sync_js_controller_unittest.cc',
703 'protocol/proto_enum_conversions_unittest.cc',
704 'protocol/proto_value_conversions_unittest.cc',
705 'sessions/ordered_commit_set_unittest.cc',
706 'sessions/status_controller_unittest.cc',
707 'sessions/sync_session_unittest.cc',
708 'syncable/directory_backing_store_unittest.cc',
709 'syncable/model_type_unittest.cc',
710 'syncable/nigori_util_unittest.cc',
711 'syncable/syncable_enum_conversions_unittest.cc',
712 'syncable/syncable_id_unittest.cc',
713 'syncable/syncable_unittest.cc',
714 'syncable/syncable_util_unittest.cc',
715 'util/cryptographer_unittest.cc',
716 'util/data_encryption_win_unittest.cc',
717 'util/data_type_histogram_unittest.cc',
718 'util/get_session_name_unittest.cc',
719 'util/nigori_unittest.cc',
720 'util/protobuf_unittest.cc',
721 ],
722 'conditions': [
723 ['OS == "ios" and coverage != 0', {
724 'sources!': [
725 # These sources can't be built with coverage due to a toolchain
726 # bug: http://openradar.appspot.com/radar?id=1499403
727 'engine/syncer_unittest.cc',
728
729 # These tests crash when run with coverage turned on due to an
730 # issue with llvm_gcda_increment_indirect_counter:
731 # http://crbug.com/156058
732 'syncable/directory_backing_store_unittest.cc',
733 ],
734 }],
735 ],
736 },
737 },
738
739 # Unit tests for the 'sync_notifier' target. This cannot be a static
740 # library because the unit test files have to be compiled directly
741 # into the executable, so we push the target files to the
742 # depending executable target via direct_dependent_settings.
743 {
744 'target_name': 'sync_notifier_tests',
745 'type': 'none',
746 # We only want unit test executables to include this target.
747 'suppress_wildcard': 1,
748 'dependencies': [
749 '../base/base.gyp:base',
750 '../jingle/jingle.gyp:notifier_test_util',
751 '../net/net.gyp:net_test_support',
752 '../testing/gmock.gyp:gmock',
753 '../testing/gtest.gyp:gtest',
754 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidatio n',
755 '../third_party/libjingle/libjingle.gyp:libjingle',
756 'sync_core',
757 'sync_notifier',
758 'test_support_sync_notifier',
759 ],
760 # Propagate all dependencies since the actual compilation
761 # happens in the dependents.
762 'export_dependent_settings': [
763 '../base/base.gyp:base',
764 '../jingle/jingle.gyp:notifier_test_util',
765 '../net/net.gyp:net_test_support',
766 '../testing/gmock.gyp:gmock',
767 '../testing/gtest.gyp:gtest',
768 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidatio n',
769 '../third_party/libjingle/libjingle.gyp:libjingle',
770 'sync_core',
771 'sync_notifier',
772 'test_support_sync_notifier',
773 ],
774 'direct_dependent_settings': {
775 'include_dirs': [
776 '..',
777 ],
778 'sources': [
779 'notifier/invalidator_factory_unittest.cc',
780 ],
781 'conditions': [
782 ['OS != "android"', {
783 'sources': [
784 'notifier/ack_tracker_unittest.cc',
785 'notifier/fake_invalidator_unittest.cc',
786 'notifier/invalidation_notifier_unittest.cc',
787 'notifier/invalidator_registrar_unittest.cc',
788 'notifier/non_blocking_invalidator_unittest.cc',
789 'notifier/p2p_invalidator_unittest.cc',
790 'notifier/push_client_channel_unittest.cc',
791 'notifier/registration_manager_unittest.cc',
792 'notifier/sync_invalidation_listener_unittest.cc',
793 'notifier/sync_system_resources_unittest.cc',
794 ],
795 }],
796 ],
797 },
798 },
799
800 # Unit tests for the 'sync_internal_api' target. This cannot be a static
801 # library because the unit test files have to be compiled directly
802 # into the executable, so we push the target files to the
803 # depending executable target via direct_dependent_settings.
804 {
805 'target_name': 'sync_internal_api_tests',
806 'type': 'none',
807 # We only want unit test executables to include this target.
808 'suppress_wildcard': 1,
809 'dependencies': [
810 '../base/base.gyp:base',
811 '../net/net.gyp:net',
812 '../net/net.gyp:net_test_support',
813 '../testing/gmock.gyp:gmock',
814 '../testing/gtest.gyp:gtest',
815 'protocol/sync_proto.gyp:sync_proto',
816 'sync_core',
817 'sync_internal_api',
818 'sync_notifier',
819 'test_support_sync_internal_api',
820 ],
821 # Propagate all dependencies since the actual compilation
822 # happens in the dependents.
823 'export_dependent_settings': [
824 '../base/base.gyp:base',
825 '../net/net.gyp:net',
826 '../net/net.gyp:net_test_support',
827 '../testing/gmock.gyp:gmock',
828 '../testing/gtest.gyp:gtest',
829 'protocol/sync_proto.gyp:sync_proto',
830 'sync_core',
831 'sync_internal_api',
832 'sync_notifier',
833 'test_support_sync_internal_api',
834 ],
835 'direct_dependent_settings': {
836 'include_dirs': [
837 '..',
838 ],
839 'sources': [
840 'internal_api/debug_info_event_listener_unittest.cc',
841 'internal_api/http_bridge_unittest.cc',
842 'internal_api/js_mutation_event_observer_unittest.cc',
843 'internal_api/js_sync_encryption_handler_observer_unittest.cc',
844 'internal_api/js_sync_manager_observer_unittest.cc',
845 'internal_api/public/change_record_unittest.cc',
846 'internal_api/public/sessions/sync_session_snapshot_unittest.cc',
847 'internal_api/public/sessions/sync_source_info_unittest.cc',
848 'internal_api/syncapi_server_connection_manager_unittest.cc',
849 'internal_api/sync_encryption_handler_impl_unittest.cc',
850 'internal_api/sync_manager_impl_unittest.cc',
851 ],
852 'conditions': [
853 ['OS == "ios"', {
854 'sources!': [
855 'internal_api/http_bridge_unittest.cc',
856 ],
857 }],
858 ],
859 },
860 },
861
862 # Unit tests for the 'sync_api' target. This cannot be a static
863 # library because the unit test files have to be compiled directly
864 # into the executable, so we push the target files to the
865 # depending executable target via direct_dependent_settings.
866 {
867 'target_name': 'sync_api_tests',
868 'type': 'none',
869 # We only want unit test executables to include this target.
870 'suppress_wildcard': 1,
871 'dependencies': [
872 '../base/base.gyp:base',
873 '../testing/gtest.gyp:gtest',
874 'protocol/sync_proto.gyp:sync_proto',
875 'sync_core',
876 'sync_internal_api',
877 'test_support_sync_internal_api',
878 ],
879 # Propagate all dependencies since the actual compilation
880 # happens in the dependents.
881 'export_dependent_settings': [
882 '../base/base.gyp:base',
883 '../testing/gtest.gyp:gtest',
884 'protocol/sync_proto.gyp:sync_proto',
885 'sync_core',
886 'sync_internal_api',
887 'test_support_sync_internal_api',
888 ],
889 'direct_dependent_settings': {
890 'include_dirs': [
891 '..',
892 ],
893 'sources': [
894 'api/sync_change_unittest.cc',
895 'api/sync_error_unittest.cc',
896 'api/sync_merge_result_unittest.cc',
897 ],
898 },
899 },
900
901 # The unit test executable for sync tests.
902 {
903 'target_name': 'sync_unit_tests',
904 'type': '<(gtest_target_type)',
905 # Typed-parametrized tests generate exit-time destructors.
906 'variables': { 'enable_wexit_time_destructors': 0, },
907 'dependencies': [
908 '../base/base.gyp:run_all_unittests',
909 'sync',
910 'sync_api_tests',
911 'sync_core_tests',
912 'sync_internal_api_tests',
913 'sync_notifier_tests',
914 ],
915 'conditions': [
916 # TODO(akalin): This is needed because histogram.cc uses
917 # leak_annotations.h, which pulls this in. Make 'base'
918 # propagate this dependency.
919 ['OS=="linux" and linux_use_tcmalloc==1', {
920 'dependencies': [
921 '../base/allocator/allocator.gyp:allocator',
922 ],
923 }],
924 ['OS == "android" and gtest_target_type == "shared_library"', {
925 'dependencies': [
926 '../testing/android/native_test.gyp:native_test_native_code',
927 ],
928 }],
929 ],
930 },
931 ],
932 'conditions': [
933 ['OS != "ios"', {
934 'targets': [
935 {
936 'target_name': 'sync_tools_helper',
937 'type': 'static_library',
938 'include_dirs': [
939 '..',
940 ],
941 'dependencies': [
942 '../base/base.gyp:base',
943 'sync_notifier', 34 'sync_notifier',
35 'sync_proto',
944 ], 36 ],
945 'export_dependent_settings': [ 37 'export_dependent_settings': [
946 '../base/base.gyp:base',
947 'sync_notifier', 38 'sync_notifier',
948 ], 39 'sync_proto',
949 'sources': [
950 'tools/null_invalidation_state_tracker.cc',
951 'tools/null_invalidation_state_tracker.h',
952 ], 40 ],
953 }, 41 },
954 42
955 # A tool that can be used to launch a python sync server instance. 43 # The sync external API library.
956 { 44 {
957 'target_name': 'run_sync_testserver', 45 'target_name': 'sync_api',
958 'type': 'executable', 46 'type': 'static_library',
47 'variables': { 'enable_wexit_time_destructors': 1, },
48 'includes': [
49 'sync_api.gypi',
50 ],
959 'dependencies': [ 51 'dependencies': [
960 '../base/base.gyp:base', 52 'sync_internal_api',
961 '../base/base.gyp:test_support_base', 53 'sync_proto',
962 '../net/net.gyp:net_test_support',
963 '../testing/gtest.gyp:gtest',
964 'test_support_sync_testserver',
965 ],
966 'sources': [
967 'tools/testserver/run_sync_testserver.cc',
968 ], 54 ],
969 }, 55 },
970 56
971 # A tool to listen to sync notifications and print them out. 57 # The core sync library.
972 { 58 {
973 'target_name': 'sync_listen_notifications', 59 'target_name': 'sync_core',
974 'type': 'executable', 60 'type': 'static_library',
61 'variables': { 'enable_wexit_time_destructors': 1, },
62 'includes': [
63 'sync_core.gypi',
64 ],
975 'dependencies': [ 65 'dependencies': [
976 '../base/base.gyp:base', 66 'sync_proto',
977 '../jingle/jingle.gyp:notifier',
978 '../net/net.gyp:net',
979 '../net/net.gyp:net_test_support',
980 'sync',
981 'sync_tools_helper',
982 ], 67 ],
983 'sources': [ 68 'export_dependent_settings': [
984 'tools/sync_listen_notifications.cc', 69 'sync_proto',
985 ], 70 ],
986 }, 71 },
987 72
988 # A standalone command-line sync client. 73 # The sync internal API library.
989 { 74 {
990 'target_name': 'sync_client', 75 'target_name': 'sync_internal_api',
991 'type': 'executable', 76 'type': 'static_library',
992 'defines': [ 77 'variables': { 'enable_wexit_time_destructors': 1, },
993 'SYNC_TEST', 78 'includes': [
79 'sync_internal_api.gypi',
994 ], 80 ],
995 'dependencies': [ 81 'dependencies': [
996 '../base/base.gyp:base', 82 'sync_core',
997 '../jingle/jingle.gyp:notifier', 83 'sync_notifier',
998 '../net/net.gyp:net', 84 'sync_proto',
999 '../net/net.gyp:net_test_support',
1000 'sync',
1001 'sync_tools_helper',
1002 ], 85 ],
1003 'sources': [ 86 'export_dependent_settings': [
1004 'tools/sync_client.cc', 87 'sync_core',
88 'sync_proto',
89 ],
90 },
91
92 # The sync notifications library.
93 {
94 'target_name': 'sync_notifier',
95 'type': 'static_library',
96 'variables': { 'enable_wexit_time_destructors': 1, },
97 'includes': [
98 'sync_notifier.gypi',
99 ],
100 'dependencies': [
101 'sync_core',
102 ],
103 },
104
105 # The sync protocol buffer library.
106 {
107 'target_name': 'sync_proto',
108 'type': 'static_library',
109 'variables': { 'enable_wexit_time_destructors': 1, },
110 'includes': [
111 'sync_proto.gypi',
112 ],
113 },
114 ],
115 },
116 { # component != static_library
117 'targets': [
118 # The public sync shared library target.
119 {
120 'target_name': 'sync',
121 'type': 'shared_library',
122 'variables': { 'enable_wexit_time_destructors': 1, },
123 'includes': [
124 'sync_api.gypi',
125 'sync_core.gypi',
126 'sync_internal_api.gypi',
127 'sync_notifier.gypi',
128 'sync_proto.gypi',
1005 ], 129 ],
1006 }, 130 },
1007 ], 131 ],
1008 }], 132 }],
1009 ['OS == "android"', {
1010 'targets': [
1011 {
1012 'target_name': 'sync_java',
1013 'type': 'none',
1014 'variables': {
1015 'package_name': 'sync',
1016 'java_in_dir': '../sync/android/java',
1017 },
1018 'dependencies': [
1019 '../base/base.gyp:base_java',
1020 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalid ation_javalib',
1021 '../third_party/guava/guava.gyp:guava_javalib',
1022 '../third_party/jsr-305/jsr-305.gyp:jsr_305_javalib',
1023 ],
1024 'includes': [ '../build/java.gypi' ],
1025 },
1026 {
1027 'target_name': 'sync_javatests',
1028 'type': 'none',
1029 'variables': {
1030 'package_name': 'sync_javatests',
1031 'java_in_dir': '../sync/android/javatests',
1032 },
1033 'dependencies': [
1034 'sync_java',
1035 '../base/base.gyp:base_java_test_support',
1036 ],
1037 'includes': [ '../build/java.gypi' ],
1038 },
1039 ],
1040 }],
1041
1042 # Special target to wrap a gtest_target_type==shared_library
1043 # sync_unit_tests into an android apk for execution.
1044 ['OS == "android" and gtest_target_type == "shared_library"', {
1045 'targets': [
1046 {
1047 'target_name': 'sync_unit_tests_apk',
1048 'type': 'none',
1049 'dependencies': [
1050 'sync_unit_tests',
1051 ],
1052 'variables': {
1053 'test_suite_name': 'sync_unit_tests',
1054 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)sync_unit _tests<(SHARED_LIB_SUFFIX)',
1055 },
1056 'includes': [ '../build/apk_test.gypi' ],
1057 },
1058 ],
1059 }],
1060 ], 133 ],
1061 } 134 }
OLDNEW
« no previous file with comments | « sync/protocol/sync_proto.gyp ('k') | sync/sync_api.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698