diff options
author | Joe Onorato <joeo@google.com> | 2012-05-18 20:43:14 -0700 |
---|---|---|
committer | Joe Onorato <joeo@google.com> | 2012-08-16 22:45:55 -0700 |
commit | 918ee311f53d4128d753cca23b2b9a5212bd94f7 (patch) | |
tree | 1b6c2caf6fa17ce60ee823c687bacb623bf06d30 /core/base_rules.mk | |
parent | 10649c632d7e4385909424473ad5a566177216b2 (diff) | |
download | build-918ee311f53d4128d753cca23b2b9a5212bd94f7.zip build-918ee311f53d4128d753cca23b2b9a5212bd94f7.tar.gz build-918ee311f53d4128d753cca23b2b9a5212bd94f7.tar.bz2 |
Don't give the user tag to host modules automatically.
Change-Id: I12d0a84786e5bf2224efd8684526b6097e6105d7
Diffstat (limited to 'core/base_rules.mk')
-rw-r--r-- | core/base_rules.mk | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/core/base_rules.mk b/core/base_rules.mk index 09c2586..5f7634e 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -58,15 +58,19 @@ endif LOCAL_UNINSTALLABLE_MODULE := $(strip $(LOCAL_UNINSTALLABLE_MODULE)) LOCAL_MODULE_TAGS := $(sort $(LOCAL_MODULE_TAGS)) ifeq (,$(LOCAL_MODULE_TAGS)) -ifeq (true,$(LOCAL_UNINSTALLABLE_MODULE)) -LOCAL_MODULE_TAGS := optional -else -# Installable modules without tags fall back to user (which is changed to user eng below) -LOCAL_MODULE_TAGS := user -endif -#$(warning default tags: $(lastword $(filter-out config/% out/%,$(MAKEFILE_LIST)))) + ifeq (true,$(LOCAL_UNINSTALLABLE_MODULE)) + LOCAL_MODULE_TAGS := optional + else + ifneq ($(LOCAL_IS_HOST_MODULE),true) + # Installable target modules without tags fall back to user (which is changed to user eng + # below) + LOCAL_MODULE_TAGS := user + endif + endif + #$(warning default tags: $(lastword $(filter-out config/% out/%,$(MAKEFILE_LIST)))) endif + # Only the tags mentioned in this test are expected to be set by module # makefiles. Anything else is either a typo or a source of unexpected # behaviors. @@ -93,6 +97,7 @@ ifneq ($(filter $(LOCAL_MODULE_TAGS),user),) $(warning * the LOCAL_MODULE value for that component) $(warning * into the PRODUCT_PACKAGES section of product) $(warning * makefile(s) where necessary, if appropriate.) + $(warning * appropriate.) $(warning * ) $(warning * If the component should be in EVERY build of ALL) $(warning * products, then add its LOCAL_MODULE value to the) @@ -543,6 +548,17 @@ $(installed_odex) : $(built_odex) | $(ACP) $(LOCAL_INSTALLED_MODULE) : $(installed_odex) endif +# All host modules that are not tagged with optional are automatically installed. +# Save the installed files in ALL_HOST_INSTALLED_FILES. +ifeq ($(LOCAL_IS_HOST_MODULE),true) + ifneq ($(filter optional,$(LOCAL_MODULE_TAGS)),optional) + ALL_HOST_INSTALLED_FILES += $(LOCAL_INSTALLED_MODULE) + endif + ifneq ($(filter user debug eng tests, $(LOCAL_MODULE_TAGS)),) + $(error $(LOCAL_MODULE_MAKEFILE): Module "$(LOCAL_MODULE)" has useless module tags: $(filter user debug eng tests, $(LOCAL_MODULE_TAGS)). It will be installed anyway.) + endif +endif + endif # !LOCAL_UNINSTALLABLE_MODULE |