Install vintf_fragments/init_rc along with targets
Even though `m foo` installs vintf_fragments and init_rc files. There
was no direct dependency from the installed target to
vintf_fragments/init_rc files.
With the following:
cc_binary {
name: "foo",
vintf_fragments: ["foo.xml"]
}
`m out/target/product/vsoc_x86_64/system/bin/foo` didn't install
foo.xml.
This change adds the order-only deps from the target install to
vintf_fragments/init_fc files.
Bug: 198818343
Test: (see above)
Change-Id: I4656d43d15407a85fea7c95b22e4bbe19fb86aee
diff --git a/core/base_rules.mk b/core/base_rules.mk
index bb69149..3fef1e4 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -579,6 +579,8 @@
ALL_VINTF_MANIFEST_FRAGMENTS_LIST += $(my_vintf_new_pairs)
$(my_all_targets) : $(my_vintf_installed)
+ # Install fragments together with the target
+ $(LOCAL_INSTALLED_MODULE) : | $(my_vintf_installed)
endif # my_vintf_fragments
# Rule to install the module's companion init.rc.
@@ -615,6 +617,8 @@
ALL_INIT_RC_INSTALLED_PAIRS += $(my_init_rc_new_pairs)
$(my_all_targets) : $(my_init_rc_installed)
+ # Install init_rc together with the target
+ $(LOCAL_INSTALLED_MODULE) : | $(my_init_rc_installed)
endif # my_init_rc
endif # !LOCAL_IS_HOST_MODULE