Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a69b8094 authored by Colin Cross's avatar Colin Cross
Browse files

Don't create compatibility suite copy rules for installed path

Don't create compatibility suite copy rules for $(LOCAL_BUILT_MODULE)
to $(LOCAL_INSTALLED_MODULE), as that could conflict with a Soong
install rule.  Instead, always create the install rule the normal way,
and replace the compatibility suite copy rule with a noop if it is the
same as the normal rule.

Bug: 204136549
Test: m checkbuild
Change-Id: Ic8ac80eda8554fae2b7ecc2516165da020bdaebe
parent cf5c18aa
Loading
Loading
Loading
Loading
+8 −15
Original line number Diff line number Diff line
@@ -514,12 +514,6 @@ my_path_comp :=
###########################################################

my_installed_symlinks :=
my_default_test_module :=
ifeq ($(use_testcase_folder),true)
arch_dir := $($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)
my_default_test_module := $($(my_prefix)OUT_TESTCASES)/$(LOCAL_MODULE)/$(arch_dir)/$(my_installed_module_stem)
arch_dir :=
endif

ifneq (,$(LOCAL_SOONG_INSTALLED_MODULE))
  # Soong already generated the copy rule, but make the installed location depend on the Make
@@ -527,7 +521,6 @@ ifneq (,$(LOCAL_SOONG_INSTALLED_MODULE))
  # them to exist.
  $(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE)
else ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
  ifneq ($(LOCAL_INSTALLED_MODULE),$(my_default_test_module))
  $(LOCAL_INSTALLED_MODULE): PRIVATE_POST_INSTALL_CMD := $(LOCAL_POST_INSTALL_CMD)
  $(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE)
	@echo "Install: $@"
@@ -537,7 +530,6 @@ else ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
	$(copy-file-to-new-target)
  endif
	$(PRIVATE_POST_INSTALL_CMD)
  endif

  # Rule to install the module's companion symlinks
  my_installed_symlinks := $(addprefix $(my_module_path)/,$(LOCAL_MODULE_SYMLINKS) $(LOCAL_MODULE_SYMLINKS_$(my_32_64_bit_suffix)))
@@ -735,8 +727,9 @@ endif

# The module itself.
$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
  $(eval my_compat_dist_$(suite) := $(foreach dir, $(call compatibility_suite_dirs,$(suite),$(arch_dir)), \
    $(LOCAL_BUILT_MODULE):$(dir)/$(my_installed_module_stem))) \
  $(eval my_compat_dist_$(suite) := $(patsubst %:$(LOCAL_INSTALLED_MODULE),$(LOCAL_INSTALLED_MODULE):$(LOCAL_INSTALLED_MODULE),\
    $(foreach dir, $(call compatibility_suite_dirs,$(suite),$(arch_dir)), \
      $(LOCAL_BUILT_MODULE):$(dir)/$(my_installed_module_stem)))) \
  $(eval my_compat_dist_config_$(suite) := ))