update_engine: Split DBus client proxies to a library.

In order to allow other daemons call update_engine's DBus interface, we
split the generated interface to its own client library.

BUG=b:23084607
TEST=rm -rf /build/storm/var/cache/portage/chromeos-base/update_engine/out/Default/ ; emerge-link update_engine

Change-Id: Iac09b3269d9ffab599b27888b4a1a2824d262059
Reviewed-on: https://chromium-review.googlesource.com/294064
Commit-Queue: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
diff --git a/update_engine.gyp b/update_engine.gyp
index 9bead7b..6408593 100644
--- a/update_engine.gyp
+++ b/update_engine.gyp
@@ -222,6 +222,9 @@
     {
       'target_name': 'update_engine_client',
       'type': 'executable',
+      'dependencies': [
+        'libupdate_engine-client-headers',
+      ],
       'variables': {
         'exported_deps': [
           'libchrome-<(libbase_ver)',
@@ -239,12 +242,20 @@
       'sources': [
         'update_engine_client.cc',
       ],
+    },
+    # update_engine client library generated headers. Used by other daemons and
+    # by the update_engine_client console program to interact with
+    # update_engine.
+    {
+      'target_name': 'libupdate_engine-client-headers',
+      'type': 'none',
       'actions': [
         {
           'action_name': 'update_engine_client-dbus-proxies',
           'variables': {
             'dbus_service_config': 'dbus_bindings/dbus-service-config.json',
-            'proxy_output_file': 'include/update_engine/client_dbus_proxies.h'
+            'proxy_output_file': 'include/update_engine/dbus-proxies.h',
+            'mock_output_file': 'include/update_engine/dbus-proxy-mocks.h',
           },
           'sources': [
             'dbus_bindings/org.chromium.UpdateEngineInterface.xml',