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

Commit 0dcb96c2 authored by Yo Chiang's avatar Yo Chiang Committed by Gerrit Code Review
Browse files

Merge "Check module existence with ALL_MODULES subvars"

parents 9e424a5a 1db657a1
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -1157,13 +1157,12 @@ ifdef FULL_BUILD
      _modules := $(patsubst %:64,%,$(_modules))
      # Sanity check all modules in PRODUCT_PACKAGES exist. We check for the
      # existence if either <module> or the <module>_32 variant.
      _nonexistent_modules := $(filter-out $(ALL_MODULES),$(_modules))
      _nonexistent_modules := $(foreach m,$(_nonexistent_modules),\
        $(if $(call get-32-bit-modules,$(m)),,$(m)))
      _nonexistent_modules := $(foreach m,$(_modules), \
        $(if $(or $(ALL_MODULES.$(m).PATH),$(call get-modules-for-2nd-arch,TARGET,$(m))),,$(m)))
      $(call maybe-print-list-and-error,$(filter-out $(_whitelist),$(_nonexistent_modules)),\
        $(INTERNAL_PRODUCT) includes non-existent modules in PRODUCT_PACKAGES)
      $(call maybe-print-list-and-error,$(filter-out $(_nonexistent_modules),$(_whitelist)),\
        $(INTERNAL_PRODUCT) includes redundant whitelist entries for nonexistent PRODUCT_PACKAGES)
        $(INTERNAL_PRODUCT) includes redundant whitelist entries for non-existent PRODUCT_PACKAGES)
    endif

    # Check to ensure that all modules in PRODUCT_HOST_PACKAGES exist
+2 −2
Original line number Diff line number Diff line
@@ -458,8 +458,8 @@ define require-artifacts-in-path
    $(sort $(ARTIFACT_PATH_REQUIREMENT_PRODUCTS) $(current_mk)))
endef

# Makes including non-existant modules in PRODUCT_PACKAGES an error.
# $(1): whitelist of non-existant modules to allow.
# Makes including non-existent modules in PRODUCT_PACKAGES an error.
# $(1): whitelist of non-existent modules to allow.
define enforce-product-packages-exist
  $(eval current_mk := $(strip $(word 1,$(_include_stack)))) \
  $(eval PRODUCTS.$(current_mk).PRODUCT_ENFORCE_PACKAGES_EXIST := true) \