Add the ability in a product spec file to have modules installed for specific variants.

Change-Id: Ifa5eb2e15b3d3e5007378ec00efc4aec3e9a3b99
This commit is contained in:
Joe Onorato
2012-06-05 15:54:09 -07:00
parent e79fbc3bcc
commit d7d0afcaea
2 changed files with 26 additions and 4 deletions

View File

@@ -635,9 +635,18 @@ endif
user_MODULES := $(sort $(call get-tagged-modules,user shell_$(TARGET_SHELL)))
user_MODULES := $(user_MODULES) $(user_PACKAGES)
eng_MODULES := $(sort $(call get-tagged-modules,eng))
debug_MODULES := $(sort $(call get-tagged-modules,debug))
tests_MODULES := $(sort $(call get-tagged-modules,tests))
eng_MODULES := $(sort \
$(call get-tagged-modules,eng) \
$(call module-installed-files, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_ENG)) \
)
debug_MODULES := $(sort \
$(call get-tagged-modules,debug) \
$(call module-installed-files, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_DEBUG)) \
)
tests_MODULES := $(sort \
$(call get-tagged-modules,tests) \
$(call module-installed-files, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_TESTS)) \
)
ifeq ($(strip $(tags_to_install)),)
$(error ASSERTION FAILED: tags_to_install should not be empty)
@@ -671,10 +680,20 @@ ifdef is_sdk_build
modules_to_install := \
$(filter-out $(target_gnu_MODULES),$(modules_to_install))
# Ensure every module listed in PRODUCT_PACKAGES gets something installed
# Ensure every module listed in PRODUCT_PACKAGES* gets something installed
# TODO: Should we do this for all builds and not just the sdk?
$(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES), \
$(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,\
$(error Module '$(m)' in PRODUCT_PACKAGES has nothing to install!)))
$(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_DEBUG), \
$(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,\
$(error Module '$(m)' in PRODUCT_PACKAGES_DEBUG has nothing to install!)))
$(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_ENG), \
$(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,\
$(error Module '$(m)' in PRODUCT_PACKAGES_ENG has nothing to install!)))
$(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_TESTS), \
$(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,\
$(error Module '$(m)' in PRODUCT_PACKAGES_TESTS has nothing to install!)))
endif

View File

@@ -66,6 +66,9 @@ _product_var_list := \
PRODUCT_AAPT_CONFIG \
PRODUCT_AAPT_PREF_CONFIG \
PRODUCT_PACKAGES \
PRODUCT_PACKAGES_DEBUG \
PRODUCT_PACKAGES_ENG \
PRODUCT_PACKAGES_TESTS \
PRODUCT_DEVICE \
PRODUCT_MANUFACTURER \
PRODUCT_BRAND \