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

Commit f8ff9819 authored by Jaewoong Jung's avatar Jaewoong Jung Committed by Tony Mak
Browse files

Deduplicate my_compat_dist entries globally.

Cherrypick of aosp/1413709

Merged-In: Ie47e355ded0ce0221988a405fc77546a4a752c38
Fixes: 164319611
Test: m TARGET_PRODUCT=aosp_x86_64 mts dist
Change-Id: Ie47e355ded0ce0221988a405fc77546a4a752c38
parent 6efa2695
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -111,6 +111,9 @@ ALL_DISABLED_PRESUBMIT_TESTS :=
# All compatibility suites mentioned in LOCAL_COMPATIBILITY_SUITES
ALL_COMPATIBILITY_SUITES :=

# All compatibility suite files to dist.
ALL_COMPATIBILITY_DIST_FILES :=

# All LINK_TYPE entries
ALL_LINK_TYPES :=

@@ -2903,6 +2906,7 @@ endef
# 2. Add all the files to each suite's dependent files list.
# 3. Do the dependency addition to my_all_targets.
# 4. Save the module name to COMPATIBILITY.$(suite).MODULES for each suite.
# 5. Collect files to dist to ALL_COMPATIBILITY_DIST_FILES.
# Requires for each suite: use my_compat_dist_config_$(suite) to define the test config.
#    and use my_compat_dist_$(suite) to define the others.
define create-suite-dependencies
@@ -2913,10 +2917,13 @@ $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
    $(eval COMPATIBILITY.$(suite).MODULES :=)) \
  $(eval COMPATIBILITY.$(suite).FILES += \
    $$(foreach f,$$(my_compat_dist_$(suite)),$$(call word-colon,2,$$(f))) \
    $$(foreach f,$$(my_compat_dist_config_$(suite)),$$(call word-colon,2,$$(f)))) \
    $$(foreach f,$$(my_compat_dist_config_$(suite)),$$(call word-colon,2,$$(f))) \
    $$(my_compat_dist_test_data_$(suite))) \
  $(eval ALL_COMPATIBILITY_DIST_FILES += $$(my_compat_dist_$(suite))) \
  $(eval COMPATIBILITY.$(suite).MODULES += $$(my_register_name))) \
$(eval $(my_all_targets) : $(call copy-many-files, \
  $(sort $(foreach suite,$(LOCAL_COMPATIBILITY_SUITE),$(my_compat_dist_$(suite))))) \
$(eval $(my_all_targets) : \
  $(sort $(foreach suite,$(LOCAL_COMPATIBILITY_SUITE), \
    $(foreach f,$(my_compat_dist_$(suite)), $(call word-colon,2,$(f))))) \
  $(call copy-many-xml-files-checked, \
    $(sort $(foreach suite,$(LOCAL_COMPATIBILITY_SUITE),$(my_compat_dist_config_$(suite))))))
endef
+4 −0
Original line number Diff line number Diff line
@@ -1276,6 +1276,10 @@ $(file >$(HOST_OUT)/.installable_test_files,$(sort \
test_files :=
endif

# Dedpulicate compatibility suite dist files across modules and packages before
# copying them to their requested locations. Assign the eval result to an unused
# var to prevent Make from trying to make a sense of it.
_unused := $(call copy-many-files, $(sort $(ALL_COMPATIBILITY_DIST_FILES)))

# Don't include any GNU General Public License shared objects or static
# libraries in SDK images.  GPL executables (not static/dynamic libraries)