update_engine: libupdate_engine depends on dbus-proxies action.
The generated ninja file didn't have a dependency between the source
files using the generated dbus_proxies.h and dbus_mocks.h because the
included .gypi file defines an "action" and not a "rule", as in the
adaptor side.
This patch wraps the action generating the dbus proxies in its own
target, making the libupdate_engine target depend on it.
With this change, the generated .ninja files include a dependency
between obj/update_engine/libupdate_engine.actions_depends.stamp file
and obj/update_engine/update_engine-dbus-proxies.actions_rules_copies.stamp
forcing it to generate the headers before using them.
BUG=chromium:520824
TEST=rm /build/link/var/cache/portage/chromeos-base/update_engine/out/Default/gen/include/update_engine/dbus_*.h; \
FEATURES=test cros_workon_make update_engine --reconf # works
Change-Id: If66f76e105de446333ea2e24bf0c0ee7a55dc594
Reviewed-on: https://chromium-review.googlesource.com/293830
Commit-Queue: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
diff --git a/update_engine.gyp b/update_engine.gyp
index 3a6714f..9bead7b 100644
--- a/update_engine.gyp
+++ b/update_engine.gyp
@@ -70,6 +70,29 @@
],
'includes': ['../common-mk/generate-dbus-adaptors.gypi'],
},
+ {
+ 'target_name': 'update_engine-dbus-proxies',
+ 'type': 'none',
+ 'actions': [
+ {
+ 'action_name': 'update_engine-dbus-proxies-action',
+ 'variables': {
+ 'dbus_service_config': '',
+ 'mock_output_file': 'include/update_engine/dbus_mocks.h',
+ 'proxy_output_file': 'include/update_engine/dbus_proxies.h'
+ },
+ 'sources': [
+ '../debugd/share/org.chromium.debugd.xml',
+ '../login_manager/org.chromium.SessionManagerInterface.xml',
+ '../power_manager/dbus_bindings/org.chromium.PowerManager.xml',
+ '../shill/dbus_bindings/org.chromium.flimflam.Manager.xml',
+ '../shill/dbus_bindings/org.chromium.flimflam.Service.xml',
+ 'dbus_bindings/org.chromium.LibCrosService.xml',
+ ],
+ 'includes': ['../common-mk/generate-dbus-proxies.gypi'],
+ },
+ ],
+ },
# The main static_library with all the code.
{
'target_name': 'libupdate_engine',
@@ -77,6 +100,7 @@
'dependencies': [
'update_metadata-protos',
'update_engine-dbus-adaptor',
+ 'update_engine-dbus-proxies',
],
'variables': {
'exported_deps': [
@@ -170,25 +194,6 @@
'update_manager/update_manager.cc',
'utils.cc',
],
- 'actions': [
- {
- 'action_name': 'update_engine-dbus-proxies',
- 'variables': {
- 'dbus_service_config': '',
- 'mock_output_file': 'include/update_engine/dbus_mocks.h',
- 'proxy_output_file': 'include/update_engine/dbus_proxies.h'
- },
- 'sources': [
- '../debugd/share/org.chromium.debugd.xml',
- '../login_manager/org.chromium.SessionManagerInterface.xml',
- '../power_manager/dbus_bindings/org.chromium.PowerManager.xml',
- '../shill/dbus_bindings/org.chromium.flimflam.Manager.xml',
- '../shill/dbus_bindings/org.chromium.flimflam.Service.xml',
- 'dbus_bindings/org.chromium.LibCrosService.xml',
- ],
- 'includes': ['../common-mk/generate-dbus-proxies.gypi'],
- },
- ],
'conditions': [
['USE_mtd == 1', {
'sources': [