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

Commit 7b4b1b15 authored by Anton Hansson's avatar Anton Hansson Committed by Gerrit Code Review
Browse files

Merge "Dump artifacts offending path reqs into a file"

parents bd74c0cb 8c3d79dd
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -1001,17 +1001,21 @@ $(foreach makefile,$(ARTIFACT_PATH_REQUIREMENT_PRODUCTS),\
  $(eval unused_whitelist := $(filter-out $(files),$(whitelist_patterns))) \
  $(call maybe-print-list-and-error,$(unused_whitelist),$(makefile) includes redundant whitelist entries in its artifact path requirement.) \
  $(eval ### Optionally verify that nothing else produces files inside this artifact path requirement.) \
  $(if $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS),\
  $(eval extra_files := $(filter-out $(files) $(HOST_OUT)/%,$(product_FILES))) \
  $(eval files_in_requirement := $(filter $(path_patterns),$(extra_files))) \
  $(eval all_offending_files += $(files_in_requirement)) \
  $(eval whitelist := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST)) \
  $(eval whitelist_patterns := $(call resolve-product-relative-paths,$(whitelist))) \
    $(eval files_in_requirement := $(filter $(path_patterns),$(extra_files))) \
  $(eval offending_files := $(filter-out $(whitelist_patterns),$(files_in_requirement))) \
  $(if $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS),\
    $(call maybe-print-list-and-error,$(offending_files),$(INTERNAL_PRODUCT) produces files inside $(makefile)s artifact path requirement.) \
    $(eval unused_whitelist := $(filter-out $(extra_files),$(whitelist_patterns))) \
    $(call maybe-print-list-and-error,$(unused_whitelist),$(INTERNAL_PRODUCT) includes redundant artifact path requirement whitelist entries.) \
  ) \
)
$(PRODUCT_OUT)/offending_artifacts.txt:
	rm -f $@
	$(foreach f,$(sort $(all_offending_files)),echo $(f) >> $@;)

ifeq (0,1)
  $(info product_FILES for $(TARGET_DEVICE) ($(INTERNAL_PRODUCT)):)