diff options
Diffstat (limited to 'core/tasks/vendor_module_check.mk')
-rw-r--r-- | core/tasks/vendor_module_check.mk | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/core/tasks/vendor_module_check.mk b/core/tasks/vendor_module_check.mk index 2b10d1d..8d4eb05 100644 --- a/core/tasks/vendor_module_check.mk +++ b/core/tasks/vendor_module_check.mk @@ -40,6 +40,7 @@ ifneq (,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_RESTRICT_VENDOR_FILES)) _vendor_check_modules := $(sort $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES)) $(call expand-required-modules,_vendor_check_modules,$(_vendor_check_modules)) +_vendor_module_owner_info := # Restrict owners ifneq (,$(filter true owner all, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_RESTRICT_VENDOR_FILES))) @@ -50,8 +51,9 @@ endif _vendor_check_copy_files := $(filter vendor/%, $(PRODUCT_COPY_FILES)) ifneq (,$(_vendor_check_copy_files)) $(foreach c, $(_vendor_check_copy_files), \ - $(if $(filter $(_vendor_owner_whitelist), $(call word-colon, 3, $(c))),,\ - $(error Error: vendor PRODUCT_COPY_FILES file "$(c)" has unknown owner))) + $(if $(filter $(_vendor_owner_whitelist), $(call word-colon,3,$(c))),,\ + $(error Error: vendor PRODUCT_COPY_FILES file "$(c)" has unknown owner))\ + $(eval _vendor_module_owner_info += $(call word-colon,2,$(c)):$(call word-colon,3,$(c)))) endif _vendor_check_copy_files := @@ -59,7 +61,9 @@ $(foreach m, $(_vendor_check_modules), \ $(if $(filter vendor/%, $(ALL_MODULES.$(m).PATH)),\ $(if $(filter $(_vendor_owner_whitelist), $(ALL_MODULES.$(m).OWNER)),,\ $(error Error: vendor module "$(m)" in $(ALL_MODULES.$(m).PATH) with unknown owner \ - "$(ALL_MODULES.$(m).OWNER)" in product "$(TARGET_PRODUCT)")))) + "$(ALL_MODULES.$(m).OWNER)" in product "$(TARGET_PRODUCT)"))\ + $(if $(ALL_MODULES.$(m).INSTALLED),\ + $(eval _vendor_module_owner_info += $(patsubst $(PRODUCT_OUT)/%,%,$(ALL_MODULES.$(m).INSTALLED)):$(ALL_MODULES.$(m).OWNER))))) endif @@ -76,5 +80,23 @@ $(foreach m, $(_vendor_check_modules), \ endif +_vendor_module_owner_info_txt := $(call intermediates-dir-for,PACKAGING,vendor_owner_info)/vendor_owner_info.txt +$(_vendor_module_owner_info_txt): PRIVATE_INFO := $(_vendor_module_owner_info) +$(_vendor_module_owner_info_txt): + @echo "Write vendor module owner info $@" + @mkdir -p $(dir $@) && rm -f $@ +ifdef _vendor_module_owner_info + @for w in $(PRIVATE_INFO); \ + do \ + echo $$w >> $@; \ + done +else + @echo "No vendor module owner info." > $@ +endif + +$(call dist-for-goals, droidcore, $(_vendor_module_owner_info_txt)) + +_vendor_module_owner_info_txt := +_vendor_module_owner_info := _vendor_check_modules := endif |