From b2063049f878fdb37025b7f96df5adfb4585af28 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 17 Nov 2023 19:08:58 -0800 Subject: [PATCH] Don't install vintf and init.rc from Soong Soong is now handling installing init.rc and vintf fragment files, don't install them in Make for Soong modules. Bug: 309006256 Test: Compare installed files Change-Id: Ied43c207c6ae158d3f41d81c7fe16688331bf13c --- core/base_rules.mk | 22 ++++++++++++---------- core/definitions.mk | 8 ++------ 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/core/base_rules.mk b/core/base_rules.mk index f533358e5f..f38a399191 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -541,13 +541,14 @@ ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE)) # Only set up copy rules once, even if another arch variant shares it my_vintf_new_pairs := $(filter-out $(ALL_VINTF_MANIFEST_FRAGMENTS_LIST),$(my_vintf_pairs)) - my_vintf_new_installed := $(call copy-many-vintf-manifest-files-checked,$(my_vintf_new_pairs)) - 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) + ifneq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK)) + $(call copy-many-vintf-manifest-files-checked,$(my_vintf_new_pairs)) + $(my_all_targets) : $(my_vintf_installed) + # Install fragments together with the target + $(LOCAL_INSTALLED_MODULE) : | $(my_vintf_installed) + endif endif # my_vintf_fragments # Rule to install the module's companion init.rc. @@ -579,13 +580,14 @@ ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE)) # Make sure we only set up the copy rules once, even if another arch variant # shares a common LOCAL_INIT_RC. my_init_rc_new_pairs := $(filter-out $(ALL_INIT_RC_INSTALLED_PAIRS),$(my_init_rc_pairs)) - my_init_rc_new_installed := $(call copy-many-init-script-files-checked,$(my_init_rc_new_pairs)) - 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) + ifneq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK)) + $(call copy-many-init-script-files-checked,$(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 endif # my_init_rc endif # !LOCAL_IS_HOST_MODULE diff --git a/core/definitions.mk b/core/definitions.mk index 7a6c06408b..019d36b242 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -3120,14 +3120,12 @@ endef # Copies many init script files and check they are well-formed. # $(1): The init script files to copy. Each entry is a ':' separated src:dst pair. -# Evaluates to the list of the dst files. (ie suitable for a dependency list.) define copy-many-init-script-files-checked $(foreach f, $(1), $(strip \ $(eval _cmf_tuple := $(subst :, ,$(f))) \ $(eval _cmf_src := $(word 1,$(_cmf_tuple))) \ $(eval _cmf_dest := $(word 2,$(_cmf_tuple))) \ - $(eval $(call copy-init-script-file-checked,$(_cmf_src),$(_cmf_dest))) \ - $(_cmf_dest))) + $(eval $(call copy-init-script-file-checked,$(_cmf_src),$(_cmf_dest))))) endef # Copy the file only if it's a well-formed xml file. For use via $(eval). @@ -3165,14 +3163,12 @@ endef # Copies many vintf manifest files checked. # $(1): The files to copy. Each entry is a ':' separated src:dst pair -# Evaluates to the list of the dst files (ie suitable for a dependency list) define copy-many-vintf-manifest-files-checked $(foreach f, $(1), $(strip \ $(eval _cmf_tuple := $(subst :, ,$(f))) \ $(eval _cmf_src := $(word 1,$(_cmf_tuple))) \ $(eval _cmf_dest := $(word 2,$(_cmf_tuple))) \ - $(eval $(call copy-vintf-manifest-checked,$(_cmf_src),$(_cmf_dest))) \ - $(_cmf_dest))) + $(eval $(call copy-vintf-manifest-checked,$(_cmf_src),$(_cmf_dest))))) endef # Copy the file only if it's not an ELF file. For use via $(eval).