From c478ea3dac008d86578f00c368bc58d2c94ad7b1 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Thu, 7 Mar 2019 17:18:15 -0800 Subject: [PATCH] Fix `m snod` Whenever we're not loading all makefiles, we shouldn't be checking that all the host packages exist. Test: m snod Change-Id: If1f817d855cbe329b83caee9fdd68c2cce55f02b --- core/main.mk | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/core/main.mk b/core/main.mk index 675259561..5d97027d4 100644 --- a/core/main.mk +++ b/core/main.mk @@ -1149,21 +1149,21 @@ ifeq (true|,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ENFORCE_PACKAGES_EXIST)|$(fil $(INTERNAL_PRODUCT) includes redundant whitelist entries for nonexistant PRODUCT_PACKAGES) endif -# Check to ensure that all modules in PRODUCT_HOST_PACKAGES exist -# -# Many host modules are Linux-only, so skip this check on Mac. If we ever have Mac-only modules, -# maybe it would make sense to have PRODUCT_HOST_PACKAGES_LINUX/_DARWIN? -ifneq ($(HOST_OS),darwin) - ifneq (true,$(ALLOW_MISSING_DEPENDENCIES)) - _modules := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_HOST_PACKAGES) - _nonexistant_modules := $(foreach m,$(_modules),\ - $(if $(filter FAKE,$(ALL_MODULES.$(m).CLASS))$(filter $(HOST_OUT_ROOT)/%,$(ALL_MODULES.$(m).INSTALLED)),,$(m))) - $(call maybe-print-list-and-error,$(_nonexistant_modules),\ - $(INTERNAL_PRODUCT) includes non-existant modules in PRODUCT_HOST_PACKAGES) - endif -endif - ifdef FULL_BUILD + # Check to ensure that all modules in PRODUCT_HOST_PACKAGES exist + # + # Many host modules are Linux-only, so skip this check on Mac. If we ever have Mac-only modules, + # maybe it would make sense to have PRODUCT_HOST_PACKAGES_LINUX/_DARWIN? + ifneq ($(HOST_OS),darwin) + ifneq (true,$(ALLOW_MISSING_DEPENDENCIES)) + _modules := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_HOST_PACKAGES) + _nonexistant_modules := $(foreach m,$(_modules),\ + $(if $(filter FAKE,$(ALL_MODULES.$(m).CLASS))$(filter $(HOST_OUT_ROOT)/%,$(ALL_MODULES.$(m).INSTALLED)),,$(m))) + $(call maybe-print-list-and-error,$(_nonexistant_modules),\ + $(INTERNAL_PRODUCT) includes non-existant modules in PRODUCT_HOST_PACKAGES) + endif + endif + product_host_FILES := $(call host-installed-files,$(INTERNAL_PRODUCT)) product_target_FILES := $(call product-installed-files, $(INTERNAL_PRODUCT)) # WARNING: The product_MODULES variable is depended on by external files. @@ -1254,6 +1254,7 @@ else # requested by the product, because we probably won't have rules # to build them. product_target_FILES := + product_host_FILES := endif # TODO: Remove the 3 places in the tree that use ALL_DEFAULT_INSTALLED_MODULES