Merge "$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/VoiceSearchWithKeyboard.apk)"
diff --git a/core/base_rules.mk b/core/base_rules.mk
index b8021c3..f9a1fac 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -62,6 +62,13 @@
#$(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.
+ifneq ($(filter-out user debug eng tests optional samples,$(LOCAL_MODULE_TAGS)),)
+$(warning unusual tags $(LOCAL_MODULE_TAGS) on $(LOCAL_MODULE) at $(LOCAL_PATH))
+endif
+
# Add implicit tags.
#
# If the local directory or one of its parents contains a MODULE_LICENSE_GPL
@@ -94,9 +101,13 @@
$(error $(LOCAL_PATH): LOCAL_MODULE_CLASS must contain exactly one word, not "$(LOCAL_MODULE_CLASS)")
endif
-# Add a tag like "_class@APPS" to this module so that we can filter
-# based on the class.
-LOCAL_MODULE_TAGS += _class@$(LOCAL_MODULE_CLASS)
+# Those used to be implicitly ignored, but aren't any more.
+# As of 20100110 there are no apps with the user tag.
+ifeq ($(LOCAL_MODULE_CLASS),APPS)
+ ifneq ($(filter $(LOCAL_MODULE_TAGS),user),)
+ $(warning user tag on app $(LOCAL_MODULE) at $(LOCAL_PATH) - add your app to core.mk instead)
+ endif
+endif
LOCAL_MODULE_PATH := $(strip $(LOCAL_MODULE_PATH))
ifeq ($(LOCAL_MODULE_PATH),)
diff --git a/core/definitions.mk b/core/definitions.mk
index a355c71..46bc3d1 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -572,6 +572,7 @@
# $(1): list of tags to accept
# $(2): list of tags to reject
#TODO(dbort): do $(if $(strip $(1)),$(1),$(ALL_MODULE_TAGS))
+#TODO(jbq): as of 20100106 nobody uses the second parameter
define get-tagged-modules
$(filter-out \
$(call modules-for-tag-list,$(2)), \
diff --git a/core/main.mk b/core/main.mk
index 5e318f5..2471e46 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -447,7 +447,7 @@
# modules as a side-effect. Do this after including ONE_SHOT_MAKEFILE
# so that the modules will be installed in the same place they
# would have been with a normal make.
-CUSTOM_MODULES := $(sort $(call get-tagged-modules,$(ALL_MODULE_TAGS),))
+CUSTOM_MODULES := $(sort $(call get-tagged-modules,$(ALL_MODULE_TAGS)))
FULL_BUILD :=
# Stub out the notice targets, which probably aren't defined
# when using ONE_SHOT_MAKEFILE.
@@ -521,9 +521,6 @@
# Of the modules defined by the component makefiles,
# determine what we actually want to build.
-# If a module has the "restricted" tag on it, it
-# poisons the rest of the tags and shouldn't appear
-# on any list.
Default_MODULES := $(sort $(ALL_DEFAULT_INSTALLED_MODULES) \
$(CUSTOM_MODULES))
# TODO: Remove the 3 places in the tree that use
@@ -549,12 +546,12 @@
endif
# Use tags to get the non-APPS user modules. Use the product
# definition files to get the APPS user modules.
-user_MODULES := $(sort $(call get-tagged-modules,user,_class@APPS restricted))
+user_MODULES := $(sort $(call get-tagged-modules,user))
user_MODULES := $(user_MODULES) $(user_PACKAGES)
-eng_MODULES := $(sort $(call get-tagged-modules,eng,restricted))
-debug_MODULES := $(sort $(call get-tagged-modules,debug,restricted))
-tests_MODULES := $(sort $(call get-tagged-modules,tests,restricted))
+eng_MODULES := $(sort $(call get-tagged-modules,eng))
+debug_MODULES := $(sort $(call get-tagged-modules,debug))
+tests_MODULES := $(sort $(call get-tagged-modules,tests))
ifeq ($(strip $(tags_to_install)),)
$(error ASSERTION FAILED: tags_to_install should not be empty)